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/<virbrX>/disable_ipv6 gets set to
1 even when ipv6="yes".
This commit fixes that by checking for the ipv6 network attribute during
bridge setup.
Signed-off-by: Ryan C Goodfellow <rgoodfel(a)isi.edu>
---
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 = virNetworkObjGetDef(obj);
char *field = NULL;
int ret = -1;
- bool enableIPv6 = !!virNetworkDefGetIPByIndex(def, AF_INET6, 0);
+ bool enableIPv6 = !!virNetworkDefGetIPByIndex(def, AF_INET6, 0) |
+ def->ipv6nogw;
/* set disable_ipv6 if there are no ipv6 addresses defined for the
* network. But also unset it if there *are* ipv6 addresses, as we
--
2.17.1