From e4c5b4b51785eb7219762daf2d73e7aff149982b Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Tue, 31 Jan 2017 03:42:48 +0100 Subject: [PATCH] eapol: Don't start timeout if handshake already done Don't start the handshake timeout in eapol_start if either handshake->ptk_complete is set (handshake already done) or handshake->have_snonce is set (steps 1&2 done). This accounts for eapol_start being called after a Fast Transition when a 4-Way handshake is not expected. --- src/eapol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/eapol.c b/src/eapol.c index 7a0b2f9f..5cf829cb 100644 --- a/src/eapol.c +++ b/src/eapol.c @@ -1631,8 +1631,8 @@ void eapol_register(struct eapol_sm *sm) void eapol_start(struct eapol_sm *sm) { - - sm->timeout = l_timeout_create(2, eapol_timeout, sm, NULL); + if (!sm->handshake->ptk_complete && !sm->handshake->have_snonce) + sm->timeout = l_timeout_create(2, eapol_timeout, sm, NULL); sm->started = true;