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 <j@w1.fi>
This commit is contained in:
Jouni Malinen 2023-12-16 19:45:33 +02:00
parent 80810929a4
commit 09988c4356
2 changed files with 7 additions and 2 deletions

View file

@ -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");

View file

@ -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;