diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-07-10 22:44:03 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-07-10 22:44:03 +0200 |
commit | 3915791216998a18bf6831450df68ee199e2e4f8 (patch) | |
tree | 31fa64826dec49c4911b7fec07d88923d5012d3e /src/conf_mode/interfaces-bridge.py | |
parent | cabfd006bed9cd2d1512cb313616a8e97fe29b9e (diff) | |
download | vyos-1x-3915791216998a18bf6831450df68ee199e2e4f8.tar.gz vyos-1x-3915791216998a18bf6831450df68ee199e2e4f8.zip |
vyos.configdict(): T4228: is_member() must use the "real" hardware interface
When is_member() is inspecting the bridge/Bond member interfaces it must work
with the real interface (e.g. eth1) under the "ethernet" node and not work on
the "member interface eth1" CLI tree, that makes no sense at all.
Diffstat (limited to 'src/conf_mode/interfaces-bridge.py')
-rwxr-xr-x | src/conf_mode/interfaces-bridge.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/interfaces-bridge.py b/src/conf_mode/interfaces-bridge.py index 38ae727c1..9f8eb31c6 100755 --- a/src/conf_mode/interfaces-bridge.py +++ b/src/conf_mode/interfaces-bridge.py @@ -118,11 +118,11 @@ def verify(bridge): raise ConfigError('Loopback interface "lo" can not be added to a bridge') if 'is_bridge_member' in interface_config: - tmp = next(iter(interface_config['is_bridge_member'])) + tmp = interface_config['is_bridge_member'] raise ConfigError(error_msg + f'it is already a member of bridge "{tmp}"!') if 'is_bond_member' in interface_config: - tmp = next(iter(interface_config['is_bond_member'])) + tmp = interface_config['is_bond_member'] raise ConfigError(error_msg + f'it is already a member of bond "{tmp}"!') if 'is_source_interface' in interface_config: @@ -134,7 +134,7 @@ def verify(bridge): if 'enable_vlan' in bridge: if 'has_vlan' in interface_config: - raise ConfigError(error_msg + 'it has an VLAN subinterface assigned!') + raise ConfigError(error_msg + 'it has VLAN subinterface(s) assigned!') if 'wlan' in interface: raise ConfigError(error_msg + 'VLAN aware cannot be set!') |