From: Stefan Schake Date: Wed, 18 Oct 2023 09:21:38 +0000 (+0200) Subject: Ensure WDS is available on combined backhaul and fronthaul APs X-Git-Tag: hostap_2_11~941 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc5a008004bfe7e82f7cfec393def9fbf4b60fce;p=thirdparty%2Fhostap.git 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 --- 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);