diff options
author | Felix Fietkau <nbd@nbd.name> | 2021-10-20 21:13:10 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-10-21 11:31:53 +0200 |
commit | da4be02fcd5d642954b1c9d9855d9e8d1e6205f4 (patch) | |
tree | bc76fa1fc6f282e980c04e0c8d65eb6d1ac82197 /package/network/services/hostapd/patches | |
parent | f448c2692315d379ce98c9ca21641a02c1f558d0 (diff) | |
download | upstream-da4be02fcd5d642954b1c9d9855d9e8d1e6205f4.tar.gz upstream-da4be02fcd5d642954b1c9d9855d9e8d1e6205f4.tar.bz2 upstream-da4be02fcd5d642954b1c9d9855d9e8d1e6205f4.zip |
hostapd: fix a race condition on adding AP mode wds sta interfaces
Both hostapd and netifd attempt to add a VLAN device to a bridge.
Depending on which one wins the race, bridge vlan settings might be incomplete,
or hostapd might run into an error and refuse to service the client.
Fix this by preventing hostapd from adding interfaces to the bridge and
instead rely entirely on netifd handling this properly
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/network/services/hostapd/patches')
-rw-r--r-- | package/network/services/hostapd/patches/711-wds_bridge_force.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/package/network/services/hostapd/patches/711-wds_bridge_force.patch b/package/network/services/hostapd/patches/711-wds_bridge_force.patch new file mode 100644 index 0000000000..1d4848976b --- /dev/null +++ b/package/network/services/hostapd/patches/711-wds_bridge_force.patch @@ -0,0 +1,22 @@ +--- a/hostapd/config_file.c ++++ b/hostapd/config_file.c +@@ -2357,6 +2357,8 @@ static int hostapd_config_fill(struct ho + sizeof(conf->bss[0]->iface)); + } else if (os_strcmp(buf, "bridge") == 0) { + os_strlcpy(bss->bridge, pos, sizeof(bss->bridge)); ++ if (!bss->wds_bridge[0]) ++ os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge)); + } else if (os_strcmp(buf, "snoop_iface") == 0) { + os_strlcpy(bss->snoop_iface, pos, sizeof(bss->snoop_iface)); + } else if (os_strcmp(buf, "vlan_bridge") == 0) { +--- a/src/ap/ap_drv_ops.c ++++ b/src/ap/ap_drv_ops.c +@@ -340,8 +340,6 @@ int hostapd_set_wds_sta(struct hostapd_d + return -1; + if (hapd->conf->wds_bridge[0]) + bridge = hapd->conf->wds_bridge; +- else if (hapd->conf->bridge[0]) +- bridge = hapd->conf->bridge; + return hapd->driver->set_wds_sta(hapd->drv_priv, addr, aid, val, + bridge, ifname_wds); + } |