slirp updates
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCgAGBQJW/Fx2AAoJEOPlHOj7ay8dGd8P/1r2x+xJyYkyYpOG/JvjdxQA a0WeD3EechgUVki8DJptzgRmm96vnNZKsNJ2ZiwuVlsk8RgA3ZpYHsWiNczOQADb G2aKeDh9BGmCwj0FnS5zAURWA6Kw8jbvvnAIaay+1/aihHDKtZPrV/4Q0tandoX1 E+Lxt6IQghBLKhZ8qLb4/EifZqXWL23NAAz8mSQQ8gVeX6RMNST670YGvVSVnG3x fdO+It2NVoSTLLfFYFN4TIAELrlEz2KzjtqLMu3zGWKioCSe2bCqCfLn8Z+aFqHB Z61EQudHqng8u6xrYxj6SF0teqqE9zKE1ZJE7L8WADlXajY58NQ+g+QC+Ep8qMun C2G2W/wVMmLQKKRXa8KDgaWYNzoKdDnpqXtaE/ATDYBHsmd7oWolUL10ZFZqyrE5 pymWexUEiW8FyHOZ6CmCOOpGW5qkvu0AFqBgbP78BhdpClpn6pGGqv90I4P5g2NM LzPLeDpnpcMQ2d9MpaXmF8Cd25fw6ozD5/R+FML3IYA0++HRIBMeN0J8NckHZ1ki GSVYZ43LDV91hfKAbWmA+n81WOv6j5/JkjmzPuWFqENW7abLuTV5mVap4Nrx5QBC YNuRqmHYBb6LPwuTaicXfD6EmYy1KICv3X9d9PrhQWwCU8ewHNO2QPtSsw8WfaGi B8xs7JAwUsCdwWwmnBSd =aDb6 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging slirp updates # gpg: Signature made Thu 31 Mar 2016 00:08:38 BST using RSA key ID FB6B2F1D # gpg: Good signature from "Samuel Thibault <samuel.thibault@gnu.org>" # gpg: aka "Samuel Thibault <sthibault@debian.org>" # gpg: aka "Samuel Thibault <samuel.thibault@inria.fr>" # gpg: aka "Samuel Thibault <samuel.thibault@labri.fr>" # gpg: aka "Samuel Thibault <samuel.thibault@ens-lyon.org>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 900C B024 B679 31D4 0F82 304B D017 8C76 7D06 9EE6 # Subkey fingerprint: F632 74CD C630 0873 CB3D 29D9 E3E5 1CE8 FB6B 2F1D * remotes/thibault/tags/samuel-thibault: Fix ipv6 options according to documentation Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
92741fc4b6
14
net/net.c
14
net/net.c
@ -1054,32 +1054,32 @@ int net_client_init(QemuOpts *opts, int is_netdev, Error **errp)
|
|||||||
|
|
||||||
{
|
{
|
||||||
/* Parse convenience option format ip6-net=fec0::0[/64] */
|
/* Parse convenience option format ip6-net=fec0::0[/64] */
|
||||||
const char *ip6_net = qemu_opt_get(opts, "ip6-net");
|
const char *ip6_net = qemu_opt_get(opts, "ipv6-net");
|
||||||
|
|
||||||
if (ip6_net) {
|
if (ip6_net) {
|
||||||
char buf[strlen(ip6_net) + 1];
|
char buf[strlen(ip6_net) + 1];
|
||||||
|
|
||||||
if (get_str_sep(buf, sizeof(buf), &ip6_net, '/') < 0) {
|
if (get_str_sep(buf, sizeof(buf), &ip6_net, '/') < 0) {
|
||||||
/* Default 64bit prefix length. */
|
/* Default 64bit prefix length. */
|
||||||
qemu_opt_set(opts, "ip6-prefix", ip6_net, &error_abort);
|
qemu_opt_set(opts, "ipv6-prefix", ip6_net, &error_abort);
|
||||||
qemu_opt_set_number(opts, "ip6-prefixlen", 64, &error_abort);
|
qemu_opt_set_number(opts, "ipv6-prefixlen", 64, &error_abort);
|
||||||
} else {
|
} else {
|
||||||
/* User-specified prefix length. */
|
/* User-specified prefix length. */
|
||||||
unsigned long len;
|
unsigned long len;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
qemu_opt_set(opts, "ip6-prefix", buf, &error_abort);
|
qemu_opt_set(opts, "ipv6-prefix", buf, &error_abort);
|
||||||
err = qemu_strtoul(ip6_net, NULL, 10, &len);
|
err = qemu_strtoul(ip6_net, NULL, 10, &len);
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
|
error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
|
||||||
"ip6-prefix", "a number");
|
"ipv6-prefix", "a number");
|
||||||
} else {
|
} else {
|
||||||
qemu_opt_set_number(opts, "ip6-prefixlen", len,
|
qemu_opt_set_number(opts, "ipv6-prefixlen", len,
|
||||||
&error_abort);
|
&error_abort);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
qemu_opt_unset(opts, "ip6-net");
|
qemu_opt_unset(opts, "ipv6-net");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user