From: Khanjan Desai Date: Wed, 4 Dec 2024 13:05:39 +0000 (+0530) Subject: PASN: Clear driver/firwmare ranging context if PASN Auth 1 fails X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5d6214a724c13d7a522dea3e0b62a769149c2378;p=thirdparty%2Fhostap.git PASN: Clear driver/firwmare ranging context if PASN Auth 1 fails When PASN auth 1 frame does not get an ack or gets failure, the call to ap_free_sta() clears the hostapd context but the driver/firmware is not aware of this and as such, still holds the context making it impossible to initiate next PASN request. Clear PASN context in underlying drivers by setting NULL context with hostapd_drv_set_secure_ranging_ctx(). Signed-off-by: Khanjan Desai --- diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 866a1c1c8..7c461d48e 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -3046,8 +3046,12 @@ static void handle_auth_pasn(struct hostapd_data *hapd, struct sta_info *sta, mgmt, len, false); wpabuf_free(sta->pasn->frame); sta->pasn->frame = NULL; - if (ret < 0) + if (ret < 0) { + hostapd_drv_set_secure_ranging_ctx(hapd, hapd->own_addr, + sta->addr, 0, 0, + NULL, 0, NULL, 1); ap_free_sta(hapd, sta); + } } else if (trans_seq == 3) { if (!sta->pasn) { wpa_printf(MSG_DEBUG,