diff options
author | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-01 19:59:17 +0200 |
---|---|---|
committer | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-04 22:59:40 +0200 |
commit | 56caf9cc1e980f5b2e03b930a5411a94190fbba7 (patch) | |
tree | fe6646dbd03374a4f9d4f189afacf0b3e48ac295 | |
parent | 4efdaa11523d4fed36f2ea73bd1aed4c4186faa7 (diff) | |
download | vyos-1x-56caf9cc1e980f5b2e03b930a5411a94190fbba7.tar.gz vyos-1x-56caf9cc1e980f5b2e03b930a5411a94190fbba7.zip |
wireguard: T2241: make address and bridge membership mutually exclusive
Bridge members should not have any addresses assigned.
-rwxr-xr-x | src/conf_mode/interfaces-wireguard.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-wireguard.py b/src/conf_mode/interfaces-wireguard.py index 3fb527401..3b18f8a15 100755 --- a/src/conf_mode/interfaces-wireguard.py +++ b/src/conf_mode/interfaces-wireguard.py @@ -200,6 +200,11 @@ def verify(wg): return None + if wg['is_bridge_member'] and wg['address']: + raise ConfigError(( + f'Cannot assign address to interface "{wg["intf"]}" ' + f'as it is a member of bridge "{wg["is_bridge_member"]}"!')) + if wg['vrf']: if wg['vrf'] not in interfaces(): raise ConfigError(f'VRF "{wg["vrf"]}" does not exist') |