diff options
Diffstat (limited to 'src/conf_mode/interfaces-ethernet.py')
-rwxr-xr-x | src/conf_mode/interfaces-ethernet.py | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/conf_mode/interfaces-ethernet.py b/src/conf_mode/interfaces-ethernet.py index ef958e9f8..8d657acba 100755 --- a/src/conf_mode/interfaces-ethernet.py +++ b/src/conf_mode/interfaces-ethernet.py @@ -173,6 +173,10 @@ def verify(eth): f'Interface "{eth["intf"]}" cannot be member of VRF "{eth["vrf"]}" ' f'and "{memberof}" at the same time!')) + if eth['mac'] and eth['is_bond_member']: + print('WARNING: "mac {0}" command will be ignored because {1} is a part of {2}'\ + .format(eth['mac'], eth['intf'], eth['is_bond_member'])) + # use common function to verify VLAN configuration verify_vlan_config(eth) return None @@ -204,8 +208,11 @@ def apply(eth): if eth['dhcpv6_temporary']: e.dhcp.v6.options['dhcpv6_temporary'] = True - if eth['dhcpv6_pd']: - e.dhcp.v6.options['dhcpv6_pd'] = e['dhcpv6_pd'] + if eth['dhcpv6_pd_length']: + e.dhcp.v6.options['dhcpv6_pd_length'] = eth['dhcpv6_pd_length'] + + if eth['dhcpv6_pd_interfaces']: + e.dhcp.v6.options['dhcpv6_pd_interfaces'] = eth['dhcpv6_pd_interfaces'] # ignore link state changes e.set_link_detect(eth['disable_link_detect']) @@ -239,11 +246,12 @@ def apply(eth): e.del_ipv6_eui64_address(addr) # Change interface MAC address - re-set to real hardware address (hw-id) - # if custom mac is removed - if eth['mac']: - e.set_mac(eth['mac']) - elif eth['hw_id']: - e.set_mac(eth['hw_id']) + # if custom mac is removed. Skip if bond member. + if not eth['is_bond_member']: + if eth['mac']: + e.set_mac(eth['mac']) + elif eth['hw_id']: + e.set_mac(eth['hw_id']) # Add IPv6 EUI-based addresses for addr in eth['ipv6_eui64_prefix']: |