3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 02:19:26 +01:00

eap: interoperability support for Success/Failure pkts

This commit is contained in:
Tim Kourt 2018-02-15 10:49:08 -08:00 committed by Denis Kenzior
parent 91ec5cff8c
commit 78270bc39e

View File

@ -290,9 +290,17 @@ void eap_rx_packet(struct eap_state *eap, const uint8_t *pkt, size_t len)
l_timeout_remove(eap->complete_timeout);
eap->complete_timeout = NULL;
/* Section 4.2 */
if (id != eap->last_id)
/* RFC3748, Section 4.2
*
* The Identifier field of the Success and Failure packets
* MUST match the Identifier field of the Response packet that
* it is sent in response to. However, many currently deployed
* implementations ignore this rule and increment Identity for
* the Success and Failure packets. In order to support
* interoperability with these products we validate id against
* eap->last_id and its incremented value.
*/
if (id != eap->last_id && id != eap->last_id + 1)
return;
if (eap_len != 4)