]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
network: only check for IPv6 RA routes when the network has an IPv6 address
authorLaine Stump <laine@laine.org>
Fri, 24 Mar 2017 00:18:25 +0000 (20:18 -0400)
committerLaine Stump <laine@laine.org>
Fri, 24 Mar 2017 13:33:55 +0000 (09:33 -0400)
commit 00d28a78 added a check to see if there were any IPv6 routes
added by RA (Router Advertisement) via an interface that had accept_ra
set to something other than "2". The check was being done
unconditionally, but it's only relevant if IPv6 forwarding is going to
be turned on, and that will only happen if the network has an IPv6
address.

src/network/bridge_driver.c

index 875c6f6509b0982ca47a100a3f7e576d8d155188..3a7a249a05fe2d6054030dfcf2c391f1dcde55b1 100644 (file)
@@ -2391,10 +2391,9 @@ networkStartNetworkVirtual(virNetworkDriverStatePtr driver,
 
     /* If forward.type != NONE, turn on global IP forwarding */
     if (network->def->forward.type != VIR_NETWORK_FORWARD_NONE) {
-        if (!virNetDevIPCheckIPv6Forwarding())
+        if (v6present && !virNetDevIPCheckIPv6Forwarding())
             goto err3; /* Precise error message already provided */
 
-
         if (networkEnableIPForwarding(v4present, v6present) < 0) {
             virReportSystemError(errno, "%s",
                                  _("failed to enable IP forwarding"));