summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorL6NqLW <64205544+L6NqLW@users.noreply.github.com>2020-05-27 17:52:55 +0200
committerGitHub <noreply@github.com>2020-05-27 17:52:55 +0200
commit47a08a610e13648074392b981af7d52f0c5506d0 (patch)
treec4e58a5f2264193f802ed4ccfb3d171ab716e8ec /src
parente57b934644379a81ac76f34c2edb7d3029f8013c (diff)
downloadvyos-1x-47a08a610e13648074392b981af7d52f0c5506d0.tar.gz
vyos-1x-47a08a610e13648074392b981af7d52f0c5506d0.zip
ethernet: T2476: do not override MAC of lower interface if bond member
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interfaces-ethernet.py11
1 files 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']: