mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-02-16 15:20:42 +01:00
eapol: detect message 2/4 retransmits
If the authenticator has already set an snonce then the packet must be a retransmit. Handle this by sending 3/4 again but making sure to not reset the frame counter.
This commit is contained in:
parent
0930d0dffc
commit
c31ae041a2
10
src/eapol.c
10
src/eapol.c
@ -1606,12 +1606,18 @@ static void eapol_handle_ptk_2_of_4(struct eapol_sm *sm,
|
|||||||
sm->handshake->support_ip_allocation = ip_req_kde != NULL;
|
sm->handshake->support_ip_allocation = ip_req_kde != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If the snonce is already set don't reset the retry counter as this
|
||||||
|
* is a rekey. To be safe take the most recent snonce (in this frame)
|
||||||
|
* in case the station created a new one.
|
||||||
|
*/
|
||||||
|
if (!sm->handshake->have_snonce)
|
||||||
|
sm->frame_retry = 0;
|
||||||
|
|
||||||
memcpy(sm->handshake->snonce, ek->key_nonce,
|
memcpy(sm->handshake->snonce, ek->key_nonce,
|
||||||
sizeof(sm->handshake->snonce));
|
sizeof(sm->handshake->snonce));
|
||||||
sm->handshake->have_snonce = true;
|
sm->handshake->have_snonce = true;
|
||||||
|
|
||||||
sm->frame_retry = 0;
|
|
||||||
|
|
||||||
eapol_ptk_3_of_4_retry(NULL, sm);
|
eapol_ptk_3_of_4_retry(NULL, sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user