From: Ben Greear Date: Sat, 28 Oct 2023 23:24:35 +0000 (-0700) Subject: MLD: Use BSS Parameters in TBTT Info to check SSID match X-Git-Tag: hostap_2_11~815 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3020f852e1cfee851e56f49106057954315c43b;p=thirdparty%2Fhostap.git MLD: Use BSS Parameters in TBTT Info to check SSID match Use the Same SSID and Colocated AP bits as an alternative way of finding a match on the current SSID. Signed-off-by: Ben Greear --- diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index e6888f567..5faa03869 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -382,6 +382,7 @@ static void wpas_process_tbtt_info(struct wpa_supplicant *wpa_s, const u8 *data) { struct wpa_bss *neigh_bss; const u8 *bssid; + u8 bss_params; u8 link_id; /* TBTT Information field @@ -398,12 +399,14 @@ static void wpas_process_tbtt_info(struct wpa_supplicant *wpa_s, const u8 *data) * B21: Disabled Link Indication */ bssid = data + 1; + bss_params = data[1 + ETH_ALEN + 4]; data += 13; /* MLD Parameters */ link_id = *(data + 1) & 0xF; - wpa_printf(MSG_DEBUG, "MLD: mld ID=%u, link ID=%u", - *data, link_id); + wpa_dbg(wpa_s, MSG_DEBUG, + "MLD: mld ID=%u, link ID=%u, bssid=" MACSTR ", bss_params=0x%x", + *data, link_id, MAC2STR(bssid), bss_params); if (*data) { wpa_printf(MSG_DEBUG, "MLD: Reported link not part of MLD"); @@ -416,7 +419,9 @@ static void wpas_process_tbtt_info(struct wpa_supplicant *wpa_s, const u8 *data) return; } - if (!wpa_scan_res_match(wpa_s, 0, neigh_bss, wpa_s->current_ssid, + if (!((bss_params & RNR_BSS_PARAM_SAME_SSID) && + (bss_params & RNR_BSS_PARAM_CO_LOCATED)) && + !wpa_scan_res_match(wpa_s, 0, neigh_bss, wpa_s->current_ssid, 1, 0)) { wpa_printf(MSG_DEBUG, "MLD: Neighbor doesn't match current SSID - skip link");