commit 7fc0a8fc0f3c1b2d9af1073bda17898d7d29e4c3
parent 9a3639f2facd8716cf72f7ea2f44e2d996437c3d
Author: James Prestwood <prestwoj@gmail.com>
Date: Wed, 12 May 2021 16:01:47 -0700
station: make station_can_fast_transition more robust
Check that the current handshake is using an FT AKM and that the
target BSS AKM suites contain an FT AKM.
Diffstat:
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/station.c b/src/station.c
@@ -1796,10 +1796,23 @@ static bool station_can_fast_transition(struct handshake_state *hs,
&mdid, NULL, NULL) < 0)
return false;
- if (bss->mde_present && l_get_le16(bss->mde) == mdid)
- return true;
+ if (!(bss->mde_present && l_get_le16(bss->mde) == mdid))
+ return false;
- return false;
+ if (hs->supplicant_ie != NULL) {
+ struct ie_rsn_info rsn_info;
+
+ if (!IE_AKM_IS_FT(hs->akm_suite))
+ return false;
+
+ if (scan_bss_get_rsn_info(bss, &rsn_info) < 0)
+ return false;
+
+ if (!IE_AKM_IS_FT(rsn_info.akm_suites))
+ return false;
+ }
+
+ return true;
}
static void station_transition_start(struct station *station,