eapol: Send EAPOL-Start if AP starts 4-Way Handshake

Make the use of EAPOL-Start the default and send it when configured for
8021x and either we receive no EAPOL-EAP from from the AP before
timeout, or if the AP tries to start a 4-Way Handshake.
This commit is contained in:
Andrew Zaborowski 2016-11-18 01:24:53 +01:00 committed by Denis Kenzior
parent 413287d5cf
commit 1a64c4b771
1 changed files with 12 additions and 1 deletions

View File

@ -760,6 +760,7 @@ struct eapol_sm *eapol_sm_new(struct handshake_state *hs)
sm = l_new(struct eapol_sm, 1);
sm->handshake = hs;
sm->use_eapol_start = true;
return sm;
}
@ -1532,8 +1533,18 @@ static void eapol_rx_packet(struct eapol_sm *sm,
break;
case 3: /* EAPOL-Key */
if (sm->eap) /* An EAP negotiation in progress? */
if (sm->eap) {
/*
* Either this is an error (EAP negotiation in
* progress) or the server is giving us a chance to
* use a cached PMK. We don't yet cache PMKs so
* send an EAPOL-Start if we haven't sent one yet.
*/
if (sm->eapol_start_timeout)
send_eapol_start(NULL, sm);
return;
}
if (!sm->handshake->have_pmk)
return;