mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-01 16:22:44 +01:00
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:
parent
413287d5cf
commit
1a64c4b771
13
src/eapol.c
13
src/eapol.c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user