diff options
author | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-01 20:06:42 +0200 |
---|---|---|
committer | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-04 22:59:40 +0200 |
commit | 9282b705afa350c49bfef4bdd46bf96c19aef5a0 (patch) | |
tree | ee334a61ec3fae54aec6cb7e9d3499d8d1209f2a /src/conf_mode/interfaces-wirelessmodem.py | |
parent | 2cb8062719280b9695b3e50c6cfa7c6997309bbc (diff) | |
download | vyos-1x-9282b705afa350c49bfef4bdd46bf96c19aef5a0.tar.gz vyos-1x-9282b705afa350c49bfef4bdd46bf96c19aef5a0.zip |
wirelessmodem: T2241: make address and bridge membership mutually exclusive
Bridge members should not have any addresses assigned.
Diffstat (limited to 'src/conf_mode/interfaces-wirelessmodem.py')
-rwxr-xr-x | src/conf_mode/interfaces-wirelessmodem.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-wirelessmodem.py b/src/conf_mode/interfaces-wirelessmodem.py index 2e25c33a9..313d19470 100755 --- a/src/conf_mode/interfaces-wirelessmodem.py +++ b/src/conf_mode/interfaces-wirelessmodem.py @@ -134,6 +134,11 @@ def verify(wwan): if not os.path.exists(f"/dev/{wwan['device']}"): raise ConfigError(f"Device {wwan['device']} does not exist") + if wwan['is_bridge_member'] and wwan['address']: + raise ConfigError(( + f'Cannot assign address to interface "{wwan["intf"]}" ' + f'as it is a member of bridge "{wwan["is_bridge_member"]}"!')) + if wwan['vrf']: if wwan['vrf'] not in interfaces(): raise ConfigError(f'VRF "{wwan["vrf"]}" does not exist') |