diff options
author | Christian Breunig <christian@breunig.cc> | 2024-05-08 21:40:35 +0200 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-05-10 13:13:53 +0000 |
commit | f47c2e5b800b8601997cde4a8ba162988cc9e930 (patch) | |
tree | dabaaa408b2837a8a1173e95fd319ce5f067106d /src/conf_mode/interfaces_bridge.py | |
parent | 5f968fe519372c3219ad550555dc499eafb6043f (diff) | |
download | vyos-1x-f47c2e5b800b8601997cde4a8ba162988cc9e930.tar.gz vyos-1x-f47c2e5b800b8601997cde4a8ba162988cc9e930.zip |
bridge: T6317: add dependency call for wireless interfaces
(cherry picked from commit 431443ab3f663a6617008536d2d6d96407aebfcb)
Diffstat (limited to 'src/conf_mode/interfaces_bridge.py')
-rwxr-xr-x | src/conf_mode/interfaces_bridge.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/conf_mode/interfaces_bridge.py b/src/conf_mode/interfaces_bridge.py index 69e657830..7b2c1ee0b 100755 --- a/src/conf_mode/interfaces_bridge.py +++ b/src/conf_mode/interfaces_bridge.py @@ -63,7 +63,10 @@ def get_config(config=None): # is already live on the system - this must not be done on first commit if interface.startswith('vxlan') and interface_exists(interface): set_dependents('vxlan', conf, interface) - + # When using Wireless member interfaces we need to inform hostapd + # to properly set-up the bridge + elif interface.startswith('wlan') and interface_exists(interface): + set_dependents('wlan', conf, interface) if dict_search('member.interface', bridge) is not None: for interface in list(bridge['member']['interface']): @@ -99,6 +102,10 @@ def get_config(config=None): # is already live on the system - this must not be done on first commit if interface.startswith('vxlan') and interface_exists(interface): set_dependents('vxlan', conf, interface) + # When using Wireless member interfaces we need to inform hostapd + # to properly set-up the bridge + elif interface.startswith('wlan') and interface_exists(interface): + set_dependents('wlan', conf, interface) # delete empty dictionary keys - no need to run code paths if nothing is there to do if 'member' in bridge: @@ -148,9 +155,6 @@ def verify(bridge): if 'enable_vlan' in bridge: if 'has_vlan' in interface_config: raise ConfigError(error_msg + 'it has VLAN subinterface(s) assigned!') - - if 'wlan' in interface: - raise ConfigError(error_msg + 'VLAN aware cannot be set!') else: for option in ['allowed_vlan', 'native_vlan']: if option in interface_config: @@ -184,7 +188,7 @@ def apply(bridge): tmp.extend(bridge['member']['interface']) for interface in tmp: - if interface.startswith(tuple(['vxlan'])) and interface_exists(interface): + if interface.startswith(tuple(['vxlan', 'wlan'])) and interface_exists(interface): try: call_dependents() except ConfigError: |