* [PATCH 4/9] ft: netdev: store FT-over-DS target RSNE/WPA
@ 2021-09-28 21:27 James Prestwood
0 siblings, 0 replies; 2+ messages in thread
From: James Prestwood @ 2021-09-28 21:27 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 1765 bytes --]
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.
---
src/ft.c | 3 +++
src/ft.h | 1 +
src/netdev.c | 10 ++++++++++
3 files changed, 14 insertions(+)
diff --git a/src/ft.c b/src/ft.c
index db09aacf..fecb4c0e 100644
--- a/src/ft.c
+++ b/src/ft.c
@@ -616,6 +616,9 @@ void ft_ds_info_free(struct ft_ds_info *info)
if (info->fte)
l_free(info->fte);
+ if (info->authenticator_ie)
+ l_free(info->authenticator_ie);
+
if (destroy)
destroy(info);
}
diff --git a/src/ft.h b/src/ft.h
index a2fa8946..f90fc1b2 100644
--- a/src/ft.h
+++ b/src/ft.h
@@ -36,6 +36,7 @@ struct ft_ds_info {
uint8_t snonce[32];
uint8_t mde[3];
uint8_t *fte;
+ uint8_t *authenticator_ie;
struct ie_ft_info ft_info;
diff --git a/src/netdev.c b/src/netdev.c
index bedc8377..603c339d 100644
--- a/src/netdev.c
+++ b/src/netdev.c
@@ -4375,6 +4375,7 @@ int netdev_fast_transition_over_ds_action(struct netdev *netdev,
struct iovec iovs[5];
uint8_t buf[512];
size_t len;
+ const uint8_t *ap_ie = NULL;
if (!netdev->operational)
return -ENOTCONN;
@@ -4392,6 +4393,15 @@ int netdev_fast_transition_over_ds_action(struct netdev *netdev,
memcpy(info->super.spa, hs->spa, ETH_ALEN);
memcpy(info->super.aa, target_bss->addr, ETH_ALEN);
memcpy(info->super.mde, target_bss->mde, sizeof(info->super.mde));
+
+ if (target_bss->rsne)
+ ap_ie = target_bss->rsne;
+ else if (target_bss->wpa)
+ ap_ie = target_bss->wpa;
+
+ if (ap_ie)
+ info->super.authenticator_ie = l_memdup(ap_ie, ap_ie[1] + 2);
+
l_getrandom(info->super.snonce, 32);
info->super.free = netdev_ft_ds_info_free;
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 4/9] ft: netdev: store FT-over-DS target RSNE/WPA
@ 2021-09-28 21:59 Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2021-09-28 21:59 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 1122 bytes --]
Hi James,
On 9/28/21 4:27 PM, James Prestwood wrote:
> 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.
> ---
> src/ft.c | 3 +++
> src/ft.h | 1 +
> src/netdev.c | 10 ++++++++++
> 3 files changed, 14 insertions(+)
>
<snip>
> @@ -4392,6 +4393,15 @@ int netdev_fast_transition_over_ds_action(struct netdev *netdev,
> memcpy(info->super.spa, hs->spa, ETH_ALEN);
> memcpy(info->super.aa, target_bss->addr, ETH_ALEN);
> memcpy(info->super.mde, target_bss->mde, sizeof(info->super.mde));
> +
> + if (target_bss->rsne)
> + ap_ie = target_bss->rsne;
> + else if (target_bss->wpa)
> + ap_ie = target_bss->wpa;
> +
> + if (ap_ie)
> + info->super.authenticator_ie = l_memdup(ap_ie, ap_ie[1] + 2);
> +
> l_getrandom(info->super.snonce, 32);
> info->super.free = netdev_ft_ds_info_free;
>
>
There's no FT in WPA, so the only way we get here is with RSNE or possibly Open.
So I simplified this slightly.
Patches 1-4 applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-28 21:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28 21:27 [PATCH 4/9] ft: netdev: store FT-over-DS target RSNE/WPA James Prestwood
2021-09-28 21:59 Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.