diff options
author | Jernej Jakob <jernej.jakob@gmail.com> | 2020-04-22 17:08:44 +0200 |
---|---|---|
committer | Jernej Jakob <jernej.jakob@gmail.com> | 2020-04-23 15:01:06 +0200 |
commit | 0b6eb4f601dd9717b478ff38e8d4ab4fcd878b15 (patch) | |
tree | db94632df8dab84d02d3946f60c65afe63a40a3e /src/conf_mode/interfaces-vxlan.py | |
parent | 2703915afb9a6bf266adc8834ab01ef721c03424 (diff) | |
download | vyos-1x-0b6eb4f601dd9717b478ff38e8d4ab4fcd878b15.tar.gz vyos-1x-0b6eb4f601dd9717b478ff38e8d4ab4fcd878b15.zip |
interfaces: T2362: split set_ipv6_eui64_address into add and del functions
Diffstat (limited to 'src/conf_mode/interfaces-vxlan.py')
-rwxr-xr-x | src/conf_mode/interfaces-vxlan.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/conf_mode/interfaces-vxlan.py b/src/conf_mode/interfaces-vxlan.py index d238ddb57..5ed19ddf2 100755 --- a/src/conf_mode/interfaces-vxlan.py +++ b/src/conf_mode/interfaces-vxlan.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2019 VyOS maintainers and contributors +# Copyright (C) 2019-2020 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -39,7 +39,7 @@ default_config_data = { 'ip_enable_arp_ignore': 0, 'ip_proxy_arp': 0, 'ipv6_autoconf': 0, - 'ipv6_eui64_prefix': '', + 'ipv6_eui64_prefix': [], 'ipv6_forwarding': 1, 'ipv6_dup_addr_detect': 1, 'is_bridge_member': False, @@ -118,7 +118,7 @@ def get_config(): # Get prefix for IPv6 addressing based on MAC address (EUI-64) if conf.exists('ipv6 address eui64'): - vxlan['ipv6_eui64_prefix'] = conf.return_value('ipv6 address eui64') + vxlan['ipv6_eui64_prefix'].append(conf.return_value('ipv6 address eui64')) # Disable IPv6 forwarding on this interface if conf.exists('ipv6 disable-forwarding'): @@ -238,8 +238,6 @@ def apply(vxlan): v.set_proxy_arp(vxlan['ip_proxy_arp']) # IPv6 address autoconfiguration v.set_ipv6_autoconf(vxlan['ipv6_autoconf']) - # IPv6 EUI-based address - v.set_ipv6_eui64_address(vxlan['ipv6_eui64_prefix']) # IPv6 forwarding v.set_ipv6_forwarding(vxlan['ipv6_forwarding']) # IPv6 Duplicate Address Detection (DAD) tries @@ -251,6 +249,10 @@ def apply(vxlan): for addr in vxlan['address']: v.add_addr(addr) + # IPv6 EUI-based addresses + for addr in vxlan['ipv6_eui64_prefix']: + v.add_ipv6_eui64_address(addr) + # As the VXLAN interface is always disabled first when changing # parameters we will only re-enable the interface if it is not # administratively disabled |