From 7e8e8b2ac29caef3571603a798c6d2a561886901 Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Tue, 13 Feb 2018 19:37:57 +0100 Subject: [PATCH] eapol: Stop eapol timeout after step 3/4 Move the cancelling of the eapol timeout from the end of step 1 to step 3 to guard the whole handshake. At the end of step 1 stop the EAPOL-Start timeout for the case of 802.1X authentication + a cached PMKSA (not used yet.) --- src/eapol.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/eapol.c b/src/eapol.c index e30ea09c..c3ece5bc 100644 --- a/src/eapol.c +++ b/src/eapol.c @@ -1063,8 +1063,8 @@ static void eapol_handle_ptk_1_of_4(struct eapol_sm *sm, eapol_write(sm, (struct eapol_frame *) step2); l_free(step2); - l_timeout_remove(sm->timeout); - sm->timeout = NULL; + l_timeout_remove(sm->eapol_start_timeout); + sm->eapol_start_timeout = NULL; return; @@ -1346,6 +1346,9 @@ retransmit: rekey_offload(sm->handshake->ifindex, ptk->kek, ptk->kck, sm->replay_counter, sm->user_data); + l_timeout_remove(sm->timeout); + sm->timeout = NULL; + return; error_ie_different: