diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-11-18 21:41:27 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-11-18 21:41:27 +0100 |
commit | f00985ccc246194a248c8ccbbc4a9fbc6093e3e7 (patch) | |
tree | cc88517b0d68cef42636627fd127e8d86b17e200 | |
parent | 4dc93212f77c00433330f5e90d4c5383c883f644 (diff) | |
download | vyos-1x-f00985ccc246194a248c8ccbbc4a9fbc6093e3e7.tar.gz vyos-1x-f00985ccc246194a248c8ccbbc4a9fbc6093e3e7.zip |
Revert "wireless: T2241: add "wds" CLI option"
This reverts commit 806f35b5856c3f8dae634718a6a9e82cc90bb63a.
Unfortunately this did not work our in the attempt to bridge a station to a
bridge "brX" interface. Also adjusting the wireless interface during operation
cause several exceptions and the feature is removed again as it was never in any
production system.
-rw-r--r-- | data/templates/wifi/hostapd.conf.tmpl | 8 | ||||
-rw-r--r-- | interface-definitions/interfaces-wireless.xml.in | 6 | ||||
-rw-r--r-- | python/vyos/ifconfig/wireless.py | 29 | ||||
-rwxr-xr-x | src/conf_mode/interfaces-wireless.py | 1 |
4 files changed, 14 insertions, 30 deletions
diff --git a/data/templates/wifi/hostapd.conf.tmpl b/data/templates/wifi/hostapd.conf.tmpl index 16d9f7c98..e66e3472b 100644 --- a/data/templates/wifi/hostapd.conf.tmpl +++ b/data/templates/wifi/hostapd.conf.tmpl @@ -451,14 +451,6 @@ macaddr_acl=0 max_num_sta={{ max_stations }} {% endif %} -{% if wds is defined %} -# WDS (4-address frame) mode with per-station virtual interfaces -# (only supported with driver=nl80211) -# This mode allows associated stations to use 4-address frames to allow layer 2 -# bridging to be used. -wds_sta=1 -{% endif %} - {% if isolate_stations is defined %} # Client isolation can be used to prevent low-level bridging of frames between # associated stations in the BSS. By default, this bridging is allowed. diff --git a/interface-definitions/interfaces-wireless.xml.in b/interface-definitions/interfaces-wireless.xml.in index fdea1e3ab..6b238e313 100644 --- a/interface-definitions/interfaces-wireless.xml.in +++ b/interface-definitions/interfaces-wireless.xml.in @@ -771,12 +771,6 @@ </leafNode> #include <include/vif.xml.i> #include <include/vif-s.xml.i> - <leafNode name="wds"> - <properties> - <help>Enable WDS (Wireless Distribution System)</help> - <valueless/> - </properties> - </leafNode> </children> </tagNode> </children> diff --git a/python/vyos/ifconfig/wireless.py b/python/vyos/ifconfig/wireless.py index deca68bf0..37703d242 100644 --- a/python/vyos/ifconfig/wireless.py +++ b/python/vyos/ifconfig/wireless.py @@ -23,10 +23,8 @@ class WiFiIf(Interface): default = { 'type': 'wifi', - 'phy': '', - 'wds': 'off', + 'phy': 'phy0' } - definition = { **Interface.definition, **{ @@ -35,19 +33,12 @@ class WiFiIf(Interface): 'bridgeable': True, } } - options = Interface.options + \ ['phy', 'op_mode'] - _command_set = {**Interface._command_set, **{ - '4addr': { - 'shellcmd': 'iw dev {ifname} set 4addr {value}', - }, - }} - def _create(self): # all interfaces will be added in monitor mode - cmd = 'iw phy {phy} interface add {ifname} type monitor 4addr {wds}' \ + cmd = 'iw phy {phy} interface add {ifname} type monitor' \ .format(**self.config) self._cmd(cmd) @@ -59,20 +50,28 @@ class WiFiIf(Interface): .format(**self.config) self._cmd(cmd) - def set_4aadr_mode(self, state): - return self.set_interface('4addr', state) - def update(self, config): """ General helper function which works on a dictionary retrived by get_config_dict(). It's main intention is to consolidate the scattered interface setup code and provide a single point of entry when workin on any interface. """ - self.set_4aadr_mode('on' if 'wds' in config else 'off') + # We can not call add_to_bridge() until wpa_supplicant is running, thus + # we will remove the key from the config dict and react to this specal + # case in thie derived class. + # re-add ourselves to any bridge we might have fallen out of + bridge_member = '' + if 'is_bridge_member' in config: + bridge_member = config['is_bridge_member'] + del config['is_bridge_member'] # call base class first super().update(config) + # re-add ourselves to any bridge we might have fallen out of + if bridge_member: + self.add_to_bridge(bridge_member) + # Enable/Disable of an interface must always be done at the end of the # derived class to make use of the ref-counting set_admin_state() # function. We will only enable the interface if 'up' was called as diff --git a/src/conf_mode/interfaces-wireless.py b/src/conf_mode/interfaces-wireless.py index 5d723bbfd..d302c7df7 100755 --- a/src/conf_mode/interfaces-wireless.py +++ b/src/conf_mode/interfaces-wireless.py @@ -261,7 +261,6 @@ def apply(wifi): # Assign WiFi instance configuration parameters to config dict conf['phy'] = wifi['physical_device'] - conf['wds'] = 'on' if 'wds' in wifi else 'off' # Finally create the new interface w = WiFiIf(interface, **conf) |