]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Fix multi-ap fronthaul association
authorSathishkumar Muruganandam <quic_murugana@quicinc.com>
Sat, 20 May 2023 06:36:07 +0000 (12:06 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 25 May 2023 14:16:31 +0000 (17:16 +0300)
Setting 4addr mode on fronthaul BSS breaks WPS association on backhaul
STA which is still on 3addr mode.

Fix the interop issue by not setting 4addr mode on fronthaul BSS with
WPS instead of setting by default for multi-ap case.

Fronthaul BSS for non-WPS STA shall continue to use 4addr mode.

Signed-off-by: Sathishkumar Muruganandam <quic_murugana@quicinc.com>
src/ap/ieee802_11.c
src/ap/sta_info.c

index f795c06a66e227601f7468dc24068fff4243d8ec..48b0219f3d6236febd9c26ccbbaafc5fd1a4b023 100644 (file)
@@ -5758,7 +5758,11 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
                sta->flags |= WLAN_STA_WDS;
        }
 
-       if (sta->flags & (WLAN_STA_WDS | WLAN_STA_MULTI_AP)) {
+       /* 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) &&
+            !(sta->flags & WLAN_STA_WPS))) {
                int ret;
                char ifname_wds[IFNAMSIZ + 1];
 
index 4eb41528e134cf850aa8504d6ba03d7bb8404722..2fb6edf09ff97522a0c008973e3f78cf1b089419 100644 (file)
@@ -197,7 +197,10 @@ void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta)
        ap_sta_set_authorized(hapd, sta, 0);
        hostapd_set_sta_flags(hapd, sta);
 
-       if (sta->flags & (WLAN_STA_WDS | WLAN_STA_MULTI_AP))
+       if ((sta->flags & WLAN_STA_WDS) ||
+           (sta->flags & WLAN_STA_MULTI_AP &&
+            !(hapd->conf->multi_ap & FRONTHAUL_BSS) &&
+            !(sta->flags & WLAN_STA_WPS)))
                hostapd_set_wds_sta(hapd, NULL, sta->addr, sta->aid, 0);
 
        if (sta->ipaddr)