From nobody Sun Apr 28 17:09:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1539230859771685.7491384690243; Wed, 10 Oct 2018 21:07:39 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D1F4D99CEA; Thu, 11 Oct 2018 04:07:36 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E76FB74A42; Thu, 11 Oct 2018 04:07:33 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id ECE5018005B0; Thu, 11 Oct 2018 04:07:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w9B47Tv4018873 for ; Thu, 11 Oct 2018 00:07:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5171E26E63; Thu, 11 Oct 2018 04:07:29 +0000 (UTC) Received: from mx1.redhat.com (ext-mx17.extmail.prod.ext.phx2.redhat.com [10.5.110.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 482852639B for ; Thu, 11 Oct 2018 04:07:26 +0000 (UTC) Received: from mail-c.ads.isi.edu (mail-c.ads.isi.edu [128.9.180.198]) (using TLSv1.2 with cipher RC4-SHA (112/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6F22A3082E02 for ; Thu, 11 Oct 2018 04:07:25 +0000 (UTC) Received: from pool-108-21-16-247.nycmny.east.verizon.net (HELO ryzen.goodwu.net) ([108.21.16.247]) by mail-c.ads.isi.edu with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Oct 2018 21:07:24 -0700 X-IronPort-AV: E=Sophos;i="5.54,367,1534834800"; d="scan'208";a="7916022" From: Ryan Goodfellow To: libvir-list@redhat.com Date: Thu, 11 Oct 2018 00:06:34 -0400 Message-Id: <20181011040634.125810-1-rgoodfel@isi.edu> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 214 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Thu, 11 Oct 2018 04:07:25 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Thu, 11 Oct 2018 04:07:25 +0000 (UTC) for IP:'128.9.180.198' DOMAIN:'mail-c.ads.isi.edu' HELO:'mail-c.ads.isi.edu' FROM:'rgoodfel@isi.edu' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 128.9.180.198 mail-c.ads.isi.edu 128.9.180.198 mail-c.ads.isi.edu X-Scanned-By: MIMEDefang 2.84 on 10.5.110.46 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Ryan Goodfellow Subject: [libvirt] [PATCH] network: honor the ipv6 network option X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 11 Oct 2018 04:07:37 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" According the the documentation for the ipv6 network attribute https://libvirt.org/formatnetwork.html "When set to yes, the optional parameter ipv6 enables a network definition with no IPv6 gateway addresses specified to have guest-to-guest communications." But this is not the current behavior, the ipv6 attribute is ignored and the resulting /proc/sys/net/ipv6/conf//disable_ipv6 gets set to 1 even when ipv6=3D"yes". This commit fixes that by checking for the ipv6 network attribute during bridge setup. Signed-off-by: Ryan C Goodfellow --- src/network/bridge_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 4bbc4f5a6d..69022fbfbb 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -2221,7 +2221,8 @@ networkSetIPv6Sysctls(virNetworkObjPtr obj) virNetworkDefPtr def =3D virNetworkObjGetDef(obj); char *field =3D NULL; int ret =3D -1; - bool enableIPv6 =3D !!virNetworkDefGetIPByIndex(def, AF_INET6, 0); + bool enableIPv6 =3D !!virNetworkDefGetIPByIndex(def, AF_INET6, 0) | + def->ipv6nogw; =20 /* set disable_ipv6 if there are no ipv6 addresses defined for the * network. But also unset it if there *are* ipv6 addresses, as we --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list