From 47a08a610e13648074392b981af7d52f0c5506d0 Mon Sep 17 00:00:00 2001 From: L6NqLW <64205544+L6NqLW@users.noreply.github.com> Date: Wed, 27 May 2020 17:52:55 +0200 Subject: ethernet: T2476: do not override MAC of lower interface if bond member --- src/conf_mode/interfaces-ethernet.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/conf_mode/interfaces-ethernet.py b/src/conf_mode/interfaces-ethernet.py index e9cab4be7..9ba2f9a81 100755 --- a/src/conf_mode/interfaces-ethernet.py +++ b/src/conf_mode/interfaces-ethernet.py @@ -239,11 +239,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']: -- cgit v1.2.3