From: Jouni Malinen Date: Sat, 16 Dec 2023 17:45:33 +0000 (+0200) Subject: WNM: Accept link removal BSS TM Request X-Git-Tag: hostap_2_11~653 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=09988c43567a6a93720446b7048f08eb0aca0a29;p=thirdparty%2Fhostap.git WNM: Accept link removal BSS TM Request Instead of rejecting the request, accept it since the AP MLD is in control of which links are available and we are not being fully disconnected in this case. Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c index a8bd6e86e..fa9ab0e3e 100644 --- a/wpa_supplicant/wnm_sta.c +++ b/wpa_supplicant/wnm_sta.c @@ -1091,7 +1091,7 @@ static void wnm_send_bss_transition_mgmt_resp( wpabuf_put_data(buf, "\0\0\0\0\0\0", ETH_ALEN); } - if (status == WNM_BSS_TM_ACCEPT) + if (status == WNM_BSS_TM_ACCEPT && !wpa_s->wnm_link_removal) wnm_add_cand_list(wpa_s, &buf); #ifdef CONFIG_MBO @@ -1458,6 +1458,7 @@ static void ieee802_11_rx_bss_trans_mgmt_req(struct wpa_supplicant *wpa_s, wpa_s->wnm_dialog_token = pos[0]; wpa_s->wnm_mode = pos[1]; wpa_s->wnm_dissoc_timer = WPA_GET_LE16(pos + 2); + wpa_s->wnm_link_removal = false; valid_int = pos[4]; wpa_s->wnm_reply = reply; @@ -1531,6 +1532,7 @@ static void ieee802_11_rx_bss_trans_mgmt_req(struct wpa_supplicant *wpa_s, wpa_printf(MSG_INFO, "WNM: BTM request for a single MLO link - ignore disassociation imminent since other links remain associated"); disassoc_imminent = false; + wpa_s->wnm_link_removal = true; } if (disassoc_imminent) { @@ -1673,7 +1675,9 @@ static void ieee802_11_rx_bss_trans_mgmt_req(struct wpa_supplicant *wpa_s, wpa_supplicant_req_scan(wpa_s, 0, 0); } else if (reply) { enum bss_trans_mgmt_status_code status; - if (wpa_s->wnm_mode & WNM_BSS_TM_REQ_ESS_DISASSOC_IMMINENT) + + if ((wpa_s->wnm_mode & WNM_BSS_TM_REQ_ESS_DISASSOC_IMMINENT) || + wpa_s->wnm_link_removal) status = WNM_BSS_TM_ACCEPT; else { wpa_msg(wpa_s, MSG_INFO, "WNM: BSS Transition Management Request did not include candidates"); diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h index 539c0bc66..b3f1cd1b4 100644 --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h @@ -1299,6 +1299,7 @@ struct wpa_supplicant { u8 wnm_reply; u8 wnm_num_neighbor_report; u8 wnm_mode; + bool wnm_link_removal; u16 wnm_dissoc_timer; u8 wnm_bss_termination_duration[12]; struct neighbor_report *wnm_neighbor_report_elements;