diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-04-23 20:44:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-23 20:44:44 +0200 |
commit | a18d92b2205bd647691c39fde925d05d8d83fa1e (patch) | |
tree | 94a358538b8985e9a30ed138c789aac171d7dbb5 /python/vyos/ifconfig_vlan.py | |
parent | af9f033fd19c0c927a2c1555347811bee1a8a964 (diff) | |
parent | 2d1dddd1b381676743dc602a321f2fd3146adc08 (diff) | |
download | vyos-1x-a18d92b2205bd647691c39fde925d05d8d83fa1e.tar.gz vyos-1x-a18d92b2205bd647691c39fde925d05d8d83fa1e.zip |
Merge pull request #371 from jjakob/ipv6-link-local-fix
interfaces: T2362: IPv6 link-local and EUI64 address fixes
Diffstat (limited to 'python/vyos/ifconfig_vlan.py')
-rw-r--r-- | python/vyos/ifconfig_vlan.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/python/vyos/ifconfig_vlan.py b/python/vyos/ifconfig_vlan.py index 899fd17da..ee009f7f9 100644 --- a/python/vyos/ifconfig_vlan.py +++ b/python/vyos/ifconfig_vlan.py @@ -66,10 +66,18 @@ def apply_vlan_config(vlan, config): # assign/remove VRF vlan.set_vrf(config['vrf']) + # Delete old IPv6 EUI64 addresses before changing MAC + for addr in config['ipv6_eui64_prefix_remove']: + vlan.del_ipv6_eui64_address(addr) + # Change VLAN interface MAC address if config['mac']: vlan.set_mac(config['mac']) + # Add IPv6 EUI-based addresses + for addr in config['ipv6_eui64_prefix']: + vlan.add_ipv6_eui64_address(addr) + # enable/disable VLAN interface if config['disable']: vlan.set_admin_state('down') |