From 1ca1c3cfeec32dda594850caa94b2a068e0ac1aa Mon Sep 17 00:00:00 2001 From: Ilan Peer Date: Mon, 15 Mar 2021 14:57:10 +0200 Subject: [PATCH] AP: Handle deauthentication frame from PASN station When a Deauthentication frame is received, clear the corresponding PTKSA cache entry for the given station, to invalidate previous PTK information. Signed-off-by: Ilan Peer --- src/ap/ieee802_11.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 7c3e4c8bd..72d102f44 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -5837,6 +5837,9 @@ static void handle_deauth(struct hostapd_data *hapd, " reason_code=%d", MAC2STR(mgmt->sa), le_to_host16(mgmt->u.deauth.reason_code)); + /* Clear the PTKSA cache entries for PASN */ + ptksa_cache_flush(hapd->ptksa, mgmt->sa, WPA_CIPHER_NONE); + sta = ap_get_sta(hapd, mgmt->sa); if (sta == NULL) { wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Station " MACSTR " trying "