SME: MLD: Clear MLD state only after the deauthentication
In case of failure handling an Authentication frame from the AP MLD, clear the MLD state only after the deauthentication is done. This allows deauthentication process to use the AP MLD MAC address. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
parent
39fefeada6
commit
5d9b4a1a14
1 changed files with 7 additions and 8 deletions
|
@ -479,7 +479,7 @@ static int wpas_sme_ml_auth(struct wpa_supplicant *wpa_s,
|
|||
data->auth.ies_len - ie_offset,
|
||||
&elems, 0) == ParseFailed) {
|
||||
wpa_printf(MSG_DEBUG, "MLD: Failed parsing elements");
|
||||
goto out;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!elems.basic_mle || !elems.basic_mle_len) {
|
||||
|
@ -488,7 +488,7 @@ static int wpas_sme_ml_auth(struct wpa_supplicant *wpa_s,
|
|||
status_code == WLAN_STATUS_SUCCESS ||
|
||||
status_code == WLAN_STATUS_SAE_HASH_TO_ELEMENT ||
|
||||
status_code == WLAN_STATUS_SAE_PK)
|
||||
goto out;
|
||||
return -1;
|
||||
/* Accept missing Multi-Link element in failed authentication
|
||||
* cases. */
|
||||
return 0;
|
||||
|
@ -496,21 +496,17 @@ static int wpas_sme_ml_auth(struct wpa_supplicant *wpa_s,
|
|||
|
||||
mld_addr = get_basic_mle_mld_addr(elems.basic_mle, elems.basic_mle_len);
|
||||
if (!mld_addr)
|
||||
goto out;
|
||||
return -1;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "MLD: mld_address=" MACSTR, MAC2STR(mld_addr));
|
||||
|
||||
if (!ether_addr_equal(wpa_s->ap_mld_addr, mld_addr)) {
|
||||
wpa_printf(MSG_DEBUG, "MLD: Unexpected MLD address (expected "
|
||||
MACSTR ")", MAC2STR(wpa_s->ap_mld_addr));
|
||||
goto out;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
out:
|
||||
wpa_printf(MSG_DEBUG, "MLD: Authentication - clearing MLD state");
|
||||
wpas_reset_mlo_info(wpa_s);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2158,6 +2154,9 @@ void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data)
|
|||
wpas_connection_failed(wpa_s, wpa_s->pending_bssid, NULL);
|
||||
wpa_supplicant_deauthenticate(wpa_s,
|
||||
WLAN_REASON_DEAUTH_LEAVING);
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"MLD: Authentication - clearing MLD state");
|
||||
wpas_reset_mlo_info(wpa_s);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue