From c6fba800f088ca389bd73386793b5444ef185c22 Mon Sep 17 00:00:00 2001 From: Jernej Jakob Date: Fri, 1 May 2020 19:51:09 +0200 Subject: tunnel: T2241: make address and bridge membership mutually exclusive Bridge members should not have any addresses assigned. --- src/conf_mode/interfaces-tunnel.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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']: -- cgit v1.2.3