diff options
Diffstat (limited to 'src/conf_mode/interfaces-bonding.py')
-rwxr-xr-x | src/conf_mode/interfaces-bonding.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/conf_mode/interfaces-bonding.py b/src/conf_mode/interfaces-bonding.py index 0ce376a16..001da081c 100755 --- a/src/conf_mode/interfaces-bonding.py +++ b/src/conf_mode/interfaces-bonding.py @@ -20,7 +20,7 @@ from copy import deepcopy from sys import exit from netifaces import interfaces -from vyos.ifconfig import BondIf +from vyos.ifconfig import BondIf, Section from vyos.ifconfig_vlan import apply_vlan_config, verify_vlan_config from vyos.configdict import list_diff, vlan_to_dict from vyos.config import Config @@ -228,6 +228,12 @@ def get_config(): if conf.exists('mac'): bond['mac'] = conf.return_value('mac') + # Find out if MAC has changed - if so, we need to delete all IPv6 EUI64 addresses + # before re-adding them + if ( bond['mac'] and bond['intf'] in Section.interfaces(section='bonding') + and bond['mac'] != BondIf(bond['intf'], create=False).get_mac() ): + bond['ipv6_eui64_prefix_remove'] += bond['ipv6_eui64_prefix'] + # Bonding mode if conf.exists('mode'): act_mode = conf.return_value('mode') |