diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-12-06 18:13:31 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-12-06 18:13:31 +0100 |
commit | d247736f67cc056062b75a4215a031bebcfee2ee (patch) | |
tree | 9670119cd318c2299afd8a1d93605b2f73dc5357 /python/vyos/ifconfig/interface.py | |
parent | 2bfe25d4376f3b410906d157c3f9cdfd07fe79f2 (diff) | |
download | vyos-1x-d247736f67cc056062b75a4215a031bebcfee2ee.tar.gz vyos-1x-d247736f67cc056062b75a4215a031bebcfee2ee.zip |
vyos.ifconfig: T1579: do not remove IPv6 link-local address on reconfiguration
Diffstat (limited to 'python/vyos/ifconfig/interface.py')
-rw-r--r-- | python/vyos/ifconfig/interface.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py index 6837e2d6a..d695f05e3 100644 --- a/python/vyos/ifconfig/interface.py +++ b/python/vyos/ifconfig/interface.py @@ -40,6 +40,7 @@ from vyos.util import read_file from vyos.template import is_ipv4 from vyos.template import is_ipv6 from vyos.validate import is_intf_addr_assigned +from vyos.validate import is_ipv6_link_local from vyos.validate import assert_boolean from vyos.validate import assert_list from vyos.validate import assert_mac @@ -1042,7 +1043,10 @@ class Interface(Control): # list of addresses which are no longer in the dict so they can be removed cur_addr = self.get_addr() for addr in list_diff(cur_addr, new_addr): - self.del_addr(addr) + # do not clean out link-local IPv6 addresses - it makes no sense + # as they will be readded so this prevents any flapping links + if not is_ipv6_link_local(addr): + self.del_addr(addr) for addr in new_addr: self.add_addr(addr) |