From patchwork Thu Mar 31 09:17:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 8709641 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 128129F39A for ; Thu, 31 Mar 2016 09:17:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 745A420253 for ; Thu, 31 Mar 2016 09:17:45 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B10DC20148 for ; Thu, 31 Mar 2016 09:17:44 +0000 (UTC) Received: from localhost ([::1]:59096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alYjY-0000FE-0Z for patchwork-qemu-devel@patchwork.kernel.org; Thu, 31 Mar 2016 05:17:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alYjO-0000F4-AC for qemu-devel@nongnu.org; Thu, 31 Mar 2016 05:17:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alYjJ-0003fc-Iu for qemu-devel@nongnu.org; Thu, 31 Mar 2016 05:17:34 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:29400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alYjJ-0003f1-C6 for qemu-devel@nongnu.org; Thu, 31 Mar 2016 05:17:29 -0400 X-IronPort-AV: E=Sophos;i="5.24,421,1454972400"; d="scan'208";a="211333347" Received: from unknown (HELO var.youpi.perso.aquilenet.fr) ([193.50.110.221]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 31 Mar 2016 11:17:27 +0200 Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.87) (envelope-from ) id 1alYjH-0004ld-Bb; Thu, 31 Mar 2016 11:17:27 +0200 From: Samuel Thibault To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Thu, 31 Mar 2016 11:17:26 +0200 Message-Id: <1459415846-18286-2-git-send-email-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1459415846-18286-1-git-send-email-samuel.thibault@ens-lyon.org> References: <1459415846-18286-1-git-send-email-samuel.thibault@ens-lyon.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.134.164.83 Cc: Samuel Thibault , jan.kiszka@siemens.com Subject: [Qemu-devel] [PULL] Fix ipv6 options according to documentation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The options names were fixed in the qapi layer, but not in the command-line options. Signed-off-by: Samuel Thibault Reviewed-by: Eric Blake --- net/net.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/net/net.c b/net/net.c index 3b5a142..594c3b8 100644 --- a/net/net.c +++ b/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] */ - const char *ip6_net = qemu_opt_get(opts, "ip6-net"); + const char *ip6_net = qemu_opt_get(opts, "ipv6-net"); if (ip6_net) { char buf[strlen(ip6_net) + 1]; if (get_str_sep(buf, sizeof(buf), &ip6_net, '/') < 0) { /* Default 64bit prefix length. */ - qemu_opt_set(opts, "ip6-prefix", ip6_net, &error_abort); - qemu_opt_set_number(opts, "ip6-prefixlen", 64, &error_abort); + qemu_opt_set(opts, "ipv6-prefix", ip6_net, &error_abort); + qemu_opt_set_number(opts, "ipv6-prefixlen", 64, &error_abort); } else { /* User-specified prefix length. */ unsigned long len; 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); if (err) { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, - "ip6-prefix", "a number"); + "ipv6-prefix", "a number"); } else { - qemu_opt_set_number(opts, "ip6-prefixlen", len, + qemu_opt_set_number(opts, "ipv6-prefixlen", len, &error_abort); } } - qemu_opt_unset(opts, "ip6-net"); + qemu_opt_unset(opts, "ipv6-net"); } }