From 55c93007111883308bb49a203d3e8f98f7117092 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 30 Jul 2020 23:32:18 +0200 Subject: 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. --- python/vyos/ifconfig/interface.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'python/vyos/ifconfig') 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 () + 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: -- cgit v1.2.3