summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/interface.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-07-30 23:32:18 +0200
committerChristian Poessinger <christian@poessinger.com>2020-07-30 23:32:18 +0200
commit55c93007111883308bb49a203d3e8f98f7117092 (patch)
treefdbed9006bdfa39021c2e8f2a22db8b0e1175ef6 /python/vyos/ifconfig/interface.py
parent29dd5079ad38e82363032b585304d509db0fea8e (diff)
downloadvyos-1x-55c93007111883308bb49a203d3e8f98f7117092.tar.gz
vyos-1x-55c93007111883308bb49a203d3e8f98f7117092.zip
ifconfig: T2746: bugfix for non programmed link-local addresses
After the fresh rewrite of the interfaces to a unified solution (T2653) IPv6 link-local addresses are no longer added. This will result in e.g. broken RAs.
Diffstat (limited to 'python/vyos/ifconfig/interface.py')
-rw-r--r--python/vyos/ifconfig/interface.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py
index 5496499e5..d477153e8 100644
--- a/python/vyos/ifconfig/interface.py
+++ b/python/vyos/ifconfig/interface.py
@@ -954,6 +954,15 @@ class Interface(Control):
if mac:
self.set_mac(mac)
+ # Manage IPv6 link-local addresses
+ tmp = jmespath.search('ipv6.address.no_default_link_local', config)
+ # we must check explicitly for None type as if the key is set we will
+ # get an empty dict (<class 'dict'>)
+ if tmp is not None:
+ self.del_ipv6_eui64_address('fe80::/64')
+ else:
+ self.add_ipv6_eui64_address('fe80::/64')
+
# Add IPv6 EUI-based addresses
tmp = jmespath.search('ipv6.address.eui64', config)
if tmp: