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.
This commit is contained in:
Andrew Zaborowski 2017-01-31 03:42:48 +01:00 committed by Denis Kenzior
parent 95e6623011
commit e4c5b4b517
1 changed files with 2 additions and 2 deletions

View File

@ -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;