mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-13 04:38:14 +04:00
wifi-scripts: let netifd alone add WDS station interfaces to the bridge
Commit da4be02fcd ("hostapd: fix a race condition on adding AP mode
wds sta interfaces") made netifd the only process that adds WDS station
interfaces to the bridge. Its hostapd patch 711 copies bridge into
wds_bridge when it parses bridge= and wds_bridge is still empty, and
hostapd.sh writes an empty wds_bridge= after bridge=.
ap.uc does not write the empty wds_bridge=, so hostapd adds each WDS
station interface to the bridge, and netifd adds it again. The commit
above names the effects of the race: incomplete bridge vlan settings,
or a client that hostapd refuses.
Write an empty wds_bridge= for a BSS with a bridge, as hostapd.sh does.
The line must follow bridge=, because patch 711 fills an empty
wds_bridge at parse time; append_vars() writes bridge first. A
wds_bridge that the config sets for a wds BSS still applies, as in
mac80211.sh.
The previous change makes netifd link WDS station interfaces that
appeared while it had no data for their vif.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
1 parent
ed74b4b6ce
commit
002fcaf065
1 file changed
+5
@@ -39,6 +39,11 @@ function iface_setup(config, phy, num_global_macaddr, macaddr_base) {
|
||||
else
|
||||
config.wds_sta = true;
|
||||
|
||||
/* hostapd copies bridge= into an empty wds_bridge, so wds_bridge= must
|
||||
* follow bridge= in append_vars() */
|
||||
if (config.bridge)
|
||||
set_default(config, 'wds_bridge', '');
|
||||
|
||||
if (!config.idx)
|
||||
append('interface', config.ifname);
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user