Change in vdsm[ovirt-3.6.3]: net: Ignore IPv6 addresses

edwardh at redhat.com edwardh at redhat.com
Sun Mar 13 13:32:35 UTC 2016


Edward Haas has uploaded a new change for review.

Change subject: net: Ignore IPv6 addresses
......................................................................

net: Ignore IPv6 addresses

IPv6 support in 3.6 is partial, causing unexpected results when a host
is ipv6 enabled.

This patch ignores IPv6 address checks on the persistent and kernel
config.
Specifically, a scenario where a host comes up with an IPv6 address
assigned (through slaac/autoconf), kernel vs persistent config check
will pass.

Change-Id: I8a09e8fe4cde0db23def89aa88a42dd21aa22ddb
Bug-Url: https://bugzilla.redhat.com/1219363
Signed-off-by: Edward Haas <edwardh at redhat.com>
---
M lib/vdsm/netconfpersistence.py
1 file changed, 6 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/95/54695/1

diff --git a/lib/vdsm/netconfpersistence.py b/lib/vdsm/netconfpersistence.py
index 77aebd7..5ef2717 100644
--- a/lib/vdsm/netconfpersistence.py
+++ b/lib/vdsm/netconfpersistence.py
@@ -258,13 +258,7 @@
                 attributes['netmask'] = net_attr['netmask']
             if net_attr['gateway']:
                 attributes['gateway'] = net_attr['gateway']
-        if not attributes['dhcpv6']:
-            non_local_addresses = self._translate_ipv6_addr(
-                net_attr['ipv6addrs'])
-            if non_local_addresses:
-                attributes['ipv6addr'] = non_local_addresses
-            if net_attr['ipv6gateway'] != '::':
-                attributes['ipv6gateway'] = net_attr['ipv6gateway']
+        # IPv6 is ignored to avoid needless reconfiguration of networks
 
     def _translate_ipv6_addr(self, ipv6_addrs):
         return [
@@ -398,8 +392,12 @@
             prefix = net_attr.pop('prefix', None)
             if prefix is not None:
                 net_attr['netmask'] = self._netinfo.prefix2netmask(int(prefix))
+            # Ignore IPv6 to avoid needless reconfiguration of networks
             if 'ipv6addr' in net_attr:
-                net_attr['ipv6addr'] = [net_attr['ipv6addr']]
+                del net_attr['ipv6addr']
+            if 'ipv6gateway' in net_attr:
+                del net_attr['ipv6gateway']
+
             if 'defaultRoute' not in net_attr:
                 net_attr['defaultRoute'] = net_name in \
                     constants.LEGACY_MANAGEMENT_NETWORKS


-- 
To view, visit https://gerrit.ovirt.org/54695
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a09e8fe4cde0db23def89aa88a42dd21aa22ddb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6.3
Gerrit-Owner: Edward Haas <edwardh at redhat.com>


More information about the vdsm-patches mailing list