From 9a1512532e80e9ef158d1c11b23691673cd5cc78 Mon Sep 17 00:00:00 2001 From: Manoj Sekar Date: Mon, 26 Feb 2024 18:18:21 +0530 Subject: [PATCH] Multi-AP: Reject non-Multi-AP STA association on backhaul-only BSS Do not allow non-Multi-AP STAs to associate with a BSS that is configured as a backhaul-only. Signed-off-by: Manoj Sekar --- src/ap/ieee802_11.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index f5de27446..f3761dce8 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -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)