diff mbox series

multi-ap: honor wds_sta even with multi_ap

Message ID 20240428194721.1307781-1-gasmibal@gmail.com
State Accepted
Headers show
Series multi-ap: honor wds_sta even with multi_ap | expand

Commit Message

Baligh Gasmi gasmibal@gmail.com April 28, 2024, 7:47 p.m. UTC
When multi_ap is active, hostapd creates an AP-VLAN interface for
4addr stations, even though wds_sta is not configured.

A check should be added to determine if wds_sta is active before
re-enabling the WDS mode by creating an AP-VLAN for 4addr stations.

Signed-off-by: Baligh Gasmi <gasmibal@gmail.com>
---
 src/ap/ieee802_11.c | 1 +
 src/ap/sta_info.c   | 1 +
 2 files changed, 2 insertions(+)

Comments

Jouni Malinen July 13, 2024, 3:28 p.m. UTC | #1
On Sun, Apr 28, 2024 at 09:47:21PM +0200, Baligh Gasmi gasmibal@gmail.com wrote:
> When multi_ap is active, hostapd creates an AP-VLAN interface for
> 4addr stations, even though wds_sta is not configured.
> 
> A check should be added to determine if wds_sta is active before
> re-enabling the WDS mode by creating an AP-VLAN for 4addr stations.

Thanks, applied.
diff mbox series

Patch

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 54cff1038..3a32aab44 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -6561,6 +6561,7 @@  static void handle_assoc_cb(struct hostapd_data *hapd,
 	if ((sta->flags & WLAN_STA_WDS) ||
 	    (sta->flags & WLAN_STA_MULTI_AP &&
 	     (hapd->conf->multi_ap & BACKHAUL_BSS) &&
+ 	     hapd->conf->wds_sta &&
 	     !(sta->flags & WLAN_STA_WPS))) {
 		int ret;
 		char ifname_wds[IFNAMSIZ + 1];
diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c
index 87d63e188..b2f6e834f 100644
--- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c
@@ -235,6 +235,7 @@  void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta)
 	if ((sta->flags & WLAN_STA_WDS) ||
 	    (sta->flags & WLAN_STA_MULTI_AP &&
 	     (hapd->conf->multi_ap & BACKHAUL_BSS) &&
+ 	     hapd->conf->wds_sta &&
 	     !(sta->flags & WLAN_STA_WPS)))
 		hostapd_set_wds_sta(hapd, NULL, sta->addr, sta->aid, 0);