summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/interface.py
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2022-04-05 11:20:54 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2022-04-05 11:20:54 +0000
commitd6e22b28887c7a3f7d2f8b955c2e90bcadaeeeba (patch)
tree93793baa1aaf9a47cc423f4ddaa3a84ef638a114 /python/vyos/ifconfig/interface.py
parent806ff50bf1a970d731c2227f9d2cd2342b8a1b4e (diff)
downloadvyos-1x-d6e22b28887c7a3f7d2f8b955c2e90bcadaeeeba.tar.gz
vyos-1x-d6e22b28887c7a3f7d2f8b955c2e90bcadaeeeba.zip
interfaces: T4331: Fix assign link-local static IPv6 addr to vrf
If we have link-local static address and vrf, for example: set interfaces ethernet eth2 address 'fe80::5200:ff:fe55:222/64' set interfaces ethernet eth2 vrf 'foo' This IPv6 address was assigned before vrf, as result after attaching the intreface to vrf we lose this static linklocal address DEBUG/IFCONFIG cmd 'ip addr add fe80::5200:ff:fe55:222/64 dev eth2' DEBUG/IFCONFIG cmd 'ip link set dev eth2 master foo' DEBUG/IFCONFIG cmd 'ip addr add fe80::5208:ff:fe13:2/64 dev eth2' This commit fixes this, the address is assigned after vrf assign
Diffstat (limited to 'python/vyos/ifconfig/interface.py')
-rwxr-xr-xpython/vyos/ifconfig/interface.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py
index d6906a061..585a605e4 100755
--- a/python/vyos/ifconfig/interface.py
+++ b/python/vyos/ifconfig/interface.py
@@ -1434,9 +1434,6 @@ class Interface(Control):
else:
self.del_addr(addr)
- for addr in new_addr:
- self.add_addr(addr)
-
# start DHCPv6 client when only PD was configured
if dhcpv6pd:
self.set_dhcpv6(True)
@@ -1451,6 +1448,10 @@ class Interface(Control):
# checked before
self.set_vrf(config.get('vrf', ''))
+ # Add this section after vrf T4331
+ for addr in new_addr:
+ self.add_addr(addr)
+
# Configure MSS value for IPv4 TCP connections
tmp = dict_search('ip.adjust_mss', config)
value = tmp if (tmp != None) else '0'