diff options
author | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-01 20:01:54 +0200 |
---|---|---|
committer | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-04 22:59:40 +0200 |
commit | 366a53072f40f9ffbf05800787dc7faef5e489e2 (patch) | |
tree | 5c6d7e15a2e72f83ecb11be7fdeac66603240587 /src/conf_mode/interfaces-wireless.py | |
parent | 8bdbf5fa8bf4a0134d373412bfca0a562c615a5d (diff) | |
download | vyos-1x-366a53072f40f9ffbf05800787dc7faef5e489e2.tar.gz vyos-1x-366a53072f40f9ffbf05800787dc7faef5e489e2.zip |
wireless: T2241: make VRF and bridge membership mutually exclusive
Diffstat (limited to 'src/conf_mode/interfaces-wireless.py')
-rwxr-xr-x | src/conf_mode/interfaces-wireless.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/conf_mode/interfaces-wireless.py b/src/conf_mode/interfaces-wireless.py index 04125ff31..319685fbd 100755 --- a/src/conf_mode/interfaces-wireless.py +++ b/src/conf_mode/interfaces-wireless.py @@ -599,9 +599,15 @@ def verify(wifi): if not radius['key']: raise ConfigError('Misssing RADIUS shared secret key for server: {}'.format(radius['server'])) - vrf_name = wifi['vrf'] - if vrf_name and vrf_name not in interfaces(): - raise ConfigError(f'VRF "{vrf_name}" does not exist') + if wifi['vrf']: + if wifi['vrf'] not in interfaces(): + raise ConfigError(f'VRF "{wifi["vrf"]}" does not exist') + + if wifi['is_bridge_member']: + raise ConfigError(( + f'Interface "{wifi["intf"]}" cannot be member of VRF ' + f'"{wifi["vrf"]}" and bridge {wifi["is_bridge_member"]} ' + f'at the same time!')) # use common function to verify VLAN configuration verify_vlan_config(wifi) |