mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
ft: netdev: store FT-over-DS target RSNE/WPA
Keep track of the target BSS's authenticator IE for verification. It should not be assumed that the target BSS and original RSNE/WPA IE matches.
This commit is contained in:
parent
d0b0004c8c
commit
ae358bd524
3
src/ft.c
3
src/ft.c
@ -616,6 +616,9 @@ void ft_ds_info_free(struct ft_ds_info *info)
|
|||||||
if (info->fte)
|
if (info->fte)
|
||||||
l_free(info->fte);
|
l_free(info->fte);
|
||||||
|
|
||||||
|
if (info->authenticator_ie)
|
||||||
|
l_free(info->authenticator_ie);
|
||||||
|
|
||||||
if (destroy)
|
if (destroy)
|
||||||
destroy(info);
|
destroy(info);
|
||||||
}
|
}
|
||||||
|
1
src/ft.h
1
src/ft.h
@ -36,6 +36,7 @@ struct ft_ds_info {
|
|||||||
uint8_t snonce[32];
|
uint8_t snonce[32];
|
||||||
uint8_t mde[3];
|
uint8_t mde[3];
|
||||||
uint8_t *fte;
|
uint8_t *fte;
|
||||||
|
uint8_t *authenticator_ie;
|
||||||
|
|
||||||
struct ie_ft_info ft_info;
|
struct ie_ft_info ft_info;
|
||||||
|
|
||||||
|
@ -4392,6 +4392,11 @@ int netdev_fast_transition_over_ds_action(struct netdev *netdev,
|
|||||||
memcpy(info->super.spa, hs->spa, ETH_ALEN);
|
memcpy(info->super.spa, hs->spa, ETH_ALEN);
|
||||||
memcpy(info->super.aa, target_bss->addr, ETH_ALEN);
|
memcpy(info->super.aa, target_bss->addr, ETH_ALEN);
|
||||||
memcpy(info->super.mde, target_bss->mde, sizeof(info->super.mde));
|
memcpy(info->super.mde, target_bss->mde, sizeof(info->super.mde));
|
||||||
|
|
||||||
|
if (target_bss->rsne)
|
||||||
|
info->super.authenticator_ie = l_memdup(target_bss->rsne,
|
||||||
|
target_bss->rsne[1] + 2);
|
||||||
|
|
||||||
l_getrandom(info->super.snonce, 32);
|
l_getrandom(info->super.snonce, 32);
|
||||||
info->super.free = netdev_ft_ds_info_free;
|
info->super.free = netdev_ft_ds_info_free;
|
||||||
|
|
||||||
@ -4403,7 +4408,6 @@ int netdev_fast_transition_over_ds_action(struct netdev *netdev,
|
|||||||
iovs[0].iov_base = ft_req;
|
iovs[0].iov_base = ft_req;
|
||||||
iovs[0].iov_len = sizeof(ft_req);
|
iovs[0].iov_len = sizeof(ft_req);
|
||||||
|
|
||||||
|
|
||||||
if (!ft_build_authenticate_ies(hs, false, info->super.snonce,
|
if (!ft_build_authenticate_ies(hs, false, info->super.snonce,
|
||||||
buf, &len))
|
buf, &len))
|
||||||
goto failed;
|
goto failed;
|
||||||
|
Loading…
Reference in New Issue
Block a user