]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Multi-AP: Reject non-Multi-AP STA association on backhaul-only BSS
authorManoj Sekar <quic_sekar@quicinc.com>
Mon, 26 Feb 2024 12:48:21 +0000 (18:18 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 19 Mar 2024 16:57:38 +0000 (18:57 +0200)
Do not allow non-Multi-AP STAs to associate with a BSS that is
configured as a backhaul-only.

Signed-off-by: Manoj Sekar <quic_sekar@quicinc.com>
src/ap/ieee802_11.c

index f5de27446302a8e7cf4d59099e428c5861e66d0a..f3761dce8dbbc8331a8c1c5f61d0fe06214c73ab 100644 (file)
@@ -3426,6 +3426,18 @@ static u16 check_multi_ap(struct hostapd_data *hapd, struct sta_info *sta,
        if (!hapd->conf->multi_ap)
                return WLAN_STATUS_SUCCESS;
 
+       if (!multi_ap_ie) {
+               if (!(hapd->conf->multi_ap & FRONTHAUL_BSS)) {
+                       hostapd_logger(hapd, sta->addr,
+                                      HOSTAPD_MODULE_IEEE80211,
+                                      HOSTAPD_LEVEL_INFO,
+                                      "Non-Multi-AP STA tries to associate with backhaul-only BSS");
+                       return WLAN_STATUS_ASSOC_DENIED_UNSPEC;
+               }
+
+               return WLAN_STATUS_SUCCESS;
+       }
+
        status = check_multi_ap_ie(multi_ap_ie + 4, multi_ap_len - 4,
                                   &multi_ap);
        if (status != WLAN_STATUS_SUCCESS)