mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-09 00:12:36 +01:00
fils: include RSNE in authenticate
802.11ai mandates that the RSN element is included during authentication for FILS. This previously was happening by chance since supplicant_ie was being included with CMD_AUTHENTICATE. This included more than just the RSNE so that was removed in an earlier commit. Now FILS builds the RSNE itself and includes this with CMD_AUTHENTICATE.
This commit is contained in:
parent
c7a17e5987
commit
d38bd513c9
11
src/fils.c
11
src/fils.c
@ -91,6 +91,8 @@ static void fils_erp_tx_func(const uint8_t *eap_data, size_t len,
|
|||||||
uint8_t data[256];
|
uint8_t data[256];
|
||||||
uint8_t *ptr = data;
|
uint8_t *ptr = data;
|
||||||
unsigned int tlv_len;
|
unsigned int tlv_len;
|
||||||
|
struct ie_rsn_info rsn_info;
|
||||||
|
uint8_t *rsne;
|
||||||
|
|
||||||
l_getrandom(fils->nonce, 16);
|
l_getrandom(fils->nonce, 16);
|
||||||
l_getrandom(fils->session, 8);
|
l_getrandom(fils->session, 8);
|
||||||
@ -106,6 +108,15 @@ static void fils_erp_tx_func(const uint8_t *eap_data, size_t len,
|
|||||||
|
|
||||||
ie_tlv_builder_init(&builder, ptr, sizeof(data) - 4);
|
ie_tlv_builder_init(&builder, ptr, sizeof(data) - 4);
|
||||||
|
|
||||||
|
ie_parse_rsne_from_data(fils->hs->supplicant_ie,
|
||||||
|
fils->hs->supplicant_ie[1] + 2,
|
||||||
|
&rsn_info);
|
||||||
|
rsne = alloca(256);
|
||||||
|
ie_build_rsne(&rsn_info, rsne);
|
||||||
|
|
||||||
|
ie_tlv_builder_next(&builder, IE_TYPE_RSN);
|
||||||
|
ie_tlv_builder_set_data(&builder, rsne + 2, rsne[1]);
|
||||||
|
|
||||||
ie_tlv_builder_next(&builder, IE_TYPE_FILS_NONCE);
|
ie_tlv_builder_next(&builder, IE_TYPE_FILS_NONCE);
|
||||||
ie_tlv_builder_set_data(&builder, fils->nonce, sizeof(fils->nonce));
|
ie_tlv_builder_set_data(&builder, fils->nonce, sizeof(fils->nonce));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user