summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJernej Jakob <jernej.jakob@gmail.com>2020-05-01 19:51:09 +0200
committerJernej Jakob <jernej.jakob@gmail.com>2020-05-04 22:59:39 +0200
commitc6fba800f088ca389bd73386793b5444ef185c22 (patch)
tree133a3c7a0c1b231dfb682b5293ff8ec8c81328b9 /src
parentf5ebaaa3ea3091f3228c509991c06300269883ef (diff)
downloadvyos-1x-c6fba800f088ca389bd73386793b5444ef185c22.tar.gz
vyos-1x-c6fba800f088ca389bd73386793b5444ef185c22.zip
tunnel: T2241: make address and bridge membership mutually exclusive
Bridge members should not have any addresses assigned.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interfaces-tunnel.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-tunnel.py b/src/conf_mode/interfaces-tunnel.py
index 363daaf4f..2ef1017c9 100755
--- a/src/conf_mode/interfaces-tunnel.py
+++ b/src/conf_mode/interfaces-tunnel.py
@@ -535,6 +535,14 @@ def verify(conf):
f'"{options["vrf"]}" and bridge {options["bridge"]} '
f'at the same time!'))
+ # bridge and address check
+ if ( options['bridge']
+ and ( options['addresses-add']
+ or options['ipv6_autoconf'] ) ):
+ raise ConfigError((
+ f'Cannot assign address to interface "{options["name"]}" '
+ f'as it is a member of bridge "{options["bridge"]}"!'))
+
# source-interface check
if tun_dev and tun_dev not in options['interfaces']: