On 10/11/18 12:06 AM, Ryan Goodfellow wrote:
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".
Interesting, so it seems commit 705e67d40b didn't do all it claimed to
do... Or is it the case where that perception is different. The
parameter was added and the code changed to modify guest to guest
communication filters (in/for 1.0.1)
By changing this that would see to allow more - I've CC'd laine to grab
his attention to this and get his feedback, especially since commit
c0788af0 was generated after the other one and he wrote that one (in/for
1.2.7).
John
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