summaryrefslogtreecommitdiff
path: root/src/conf_mode/interfaces-dummy.py
diff options
context:
space:
mode:
authorJernej Jakob <jernej.jakob@gmail.com>2020-05-01 18:01:14 +0200
committerJernej Jakob <jernej.jakob@gmail.com>2020-05-04 22:59:39 +0200
commit571b162345aa18f440ccd3f02f8b9f4b62a16c8a (patch)
treee3f1b0ffb1c28d4564f78963ff07a61cb9d46398 /src/conf_mode/interfaces-dummy.py
parent0ea1abae11dfa5d376f4aff80cd87486370211ed (diff)
downloadvyos-1x-571b162345aa18f440ccd3f02f8b9f4b62a16c8a.tar.gz
vyos-1x-571b162345aa18f440ccd3f02f8b9f4b62a16c8a.zip
dummy: T2241: make address and bridge membership mutually exclusive
Bridge members should not have any addresses assigned.
Diffstat (limited to 'src/conf_mode/interfaces-dummy.py')
-rwxr-xr-xsrc/conf_mode/interfaces-dummy.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-dummy.py b/src/conf_mode/interfaces-dummy.py
index 712f867e1..7d266e693 100755
--- a/src/conf_mode/interfaces-dummy.py
+++ b/src/conf_mode/interfaces-dummy.py
@@ -101,6 +101,11 @@ def verify(dummy):
f'"{dummy["vrf"]}" and bridge "{dummy["is_bridge_member"]}" '
f'at the same time!'))
+ if dummy['is_bridge_member'] and dummy['address']:
+ raise ConfigError((
+ f'Cannot assign address to interface "{dummy["intf"]}" '
+ f'as it is a member of bridge "{dummy["is_bridge_member"]}"!'))
+
return None
def generate(dummy):