From cb04fb631487d3d211378435df5b66cc0b2fcc76 Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Fri, 24 Aug 2018 03:37:54 +0200 Subject: [PATCH] ap: Stop EAPOL negotiation on Disassociation Make sure we interrupt eapol traffic (4-way handshake) if we receive a Disassociation from station. Actually do this in ap_del_station because it's called from both ap_disassoc_cb and ap_success_assoc_resp_cb and seems to make sense in both cases. --- src/ap.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ap.c b/src/ap.c index 89990612..658dc115 100644 --- a/src/ap.c +++ b/src/ap.c @@ -153,6 +153,15 @@ static void ap_del_station(struct sta_state *sta, uint16_t reason, netdev_del_station(sta->ap->netdev, sta->addr, reason, disassociate); sta->associated = false; sta->rsna = false; + + if (sta->sm) + eapol_sm_free(sta->sm); + + if (sta->hs) + handshake_state_free(sta->hs); + + sta->hs = NULL; + sta->sm = NULL; } static bool ap_sta_match_addr(const void *a, const void *b)