summaryrefslogtreecommitdiff
path: root/python/vyos/utils/assertion.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-05-10 15:20:39 +0200
committerGitHub <noreply@github.com>2024-05-10 15:20:39 +0200
commitdef74a8fa4e0fb9c7ef95bfb6daff8a4f1a9878f (patch)
tree740a1b0b388723ee09ef6043da3e789aee3fc924 /python/vyos/utils/assertion.py
parent8fa1cb497f8f4e16d95c1485897663220d86c18e (diff)
parent314901e7b45782fb6266b35b0e788ab7ea1404b8 (diff)
downloadveeos-1x-def74a8fa4e0fb9c7ef95bfb6daff8a4f1a9878f.tar.gz
veeos-1x-def74a8fa4e0fb9c7ef95bfb6daff8a4f1a9878f.zip
Merge pull request #3410 from fett0/T6303
Bond: T6303: add system mac address on interfaces bond
Diffstat (limited to 'python/vyos/utils/assertion.py')
-rw-r--r--python/vyos/utils/assertion.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/vyos/utils/assertion.py b/python/vyos/utils/assertion.py
index 1aaa54dff..c7fa220c3 100644
--- a/python/vyos/utils/assertion.py
+++ b/python/vyos/utils/assertion.py
@@ -53,7 +53,7 @@ def assert_mtu(mtu, ifname):
if (max_mtu and cur_mtu > max_mtu) or cur_mtu > 65536:
raise ValueError(f'MTU is too small for interface "{ifname}": {mtu} > {max_mtu}')
-def assert_mac(m):
+def assert_mac(m, test_all_zero=True):
split = m.split(':')
size = len(split)
@@ -74,7 +74,7 @@ def assert_mac(m):
raise ValueError(f'{m} is a multicast MAC address')
# overall mac address is not allowed to be 00:00:00:00:00:00
- if sum(octets) == 0:
+ if test_all_zero and sum(octets) == 0:
raise ValueError('00:00:00:00:00:00 is not a valid MAC address')
if octets[:5] == (0, 0, 94, 0, 1):