mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
FILS: Track completion with FILS shared key authentication offload
Update the internal fils_completed state when offloading FILS shared key authentication to the driver. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
8b0a6dba87
commit
5538fc9309
@ -3909,6 +3909,13 @@ fail:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
void wpa_sm_set_reset_fils_completed(struct wpa_sm *sm, int set)
|
||||
{
|
||||
if (sm)
|
||||
sm->fils_completed = !!set;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_FILS */
|
||||
|
||||
|
||||
|
@ -451,4 +451,6 @@ struct wpabuf * owe_build_assoc_req(struct wpa_sm *sm);
|
||||
int owe_process_assoc_resp(struct wpa_sm *sm, const u8 *resp_ies,
|
||||
size_t resp_ies_len);
|
||||
|
||||
void wpa_sm_set_reset_fils_completed(struct wpa_sm *sm, int set);
|
||||
|
||||
#endif /* WPA_H */
|
||||
|
@ -2223,6 +2223,11 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
|
||||
return -1;
|
||||
}
|
||||
#endif /* CONFIG_SME */
|
||||
|
||||
/* Additional processing for FILS when SME is in driver */
|
||||
if (wpa_s->auth_alg == WPA_AUTH_ALG_FILS &&
|
||||
!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME))
|
||||
wpa_sm_set_reset_fils_completed(wpa_s->wpa, 1);
|
||||
#endif /* CONFIG_FILS */
|
||||
|
||||
#ifdef CONFIG_OWE
|
||||
@ -3681,7 +3686,9 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
}
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
wpa_supplicant_event_assoc(wpa_s, data);
|
||||
if (data && data->assoc_info.authorized)
|
||||
if ((data && data->assoc_info.authorized) ||
|
||||
(!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) &&
|
||||
wpa_fils_is_completed(wpa_s->wpa)))
|
||||
wpa_supplicant_event_assoc_auth(wpa_s, data);
|
||||
if (data) {
|
||||
wpa_msg(wpa_s, MSG_INFO,
|
||||
|
@ -2288,6 +2288,9 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FILS
|
||||
/* Clear FILS association */
|
||||
wpa_sm_set_reset_fils_completed(wpa_s->wpa, 0);
|
||||
|
||||
if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_FILS_SK_OFFLOAD) &&
|
||||
ssid->eap.erp && wpa_key_mgmt_fils(ssid->key_mgmt) &&
|
||||
eapol_sm_get_erp_info(wpa_s->eapol, &ssid->eap, &username,
|
||||
@ -2593,6 +2596,7 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
|
||||
params.key_mgmt_suite = wpa_s->key_mgmt;
|
||||
params.wpa_proto = wpa_s->wpa_proto;
|
||||
params.auth_alg = algs;
|
||||
wpa_s->auth_alg = params.auth_alg;
|
||||
params.mode = ssid->mode;
|
||||
params.bg_scan_period = ssid->bg_scan_period;
|
||||
for (i = 0; i < NUM_WEP_KEYS; i++) {
|
||||
|
@ -748,6 +748,7 @@ struct wpa_supplicant {
|
||||
int sta_uapsd;
|
||||
int set_ap_uapsd;
|
||||
int ap_uapsd;
|
||||
int auth_alg;
|
||||
|
||||
#ifdef CONFIG_SME
|
||||
struct {
|
||||
|
Loading…
Reference in New Issue
Block a user