From cc5a008004bfe7e82f7cfec393def9fbf4b60fce Mon Sep 17 00:00:00 2001 From: Stefan Schake Date: Wed, 18 Oct 2023 11:21:38 +0200 Subject: [PATCH] Ensure WDS is available on combined backhaul and fronthaul APs It is valid to configure an AP to be both backhaul and fronthaul (multi_ap=3), so we should not test for a missing fronthaul flag but instead test directly for backhaul capability. Signed-off-by: Stefan Schake --- src/ap/ieee802_11.c | 2 +- src/ap/sta_info.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 4ec410df6..2defe6c91 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -6471,7 +6471,7 @@ static void handle_assoc_cb(struct hostapd_data *hapd, /* WPS not supported on backhaul BSS. Disable 4addr mode on fronthaul */ if ((sta->flags & WLAN_STA_WDS) || (sta->flags & WLAN_STA_MULTI_AP && - !(hapd->conf->multi_ap & FRONTHAUL_BSS) && + (hapd->conf->multi_ap & BACKHAUL_BSS) && !(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 d87214ec7..4f84839e3 100644 --- a/src/ap/sta_info.c +++ b/src/ap/sta_info.c @@ -199,7 +199,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 & FRONTHAUL_BSS) && + (hapd->conf->multi_ap & BACKHAUL_BSS) && !(sta->flags & WLAN_STA_WPS))) hostapd_set_wds_sta(hapd, NULL, sta->addr, sta->aid, 0);