mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-06 12:14:04 -05:00
FT: Request reassociation after successful FT Action frame exchange
This commit is contained in:
parent
bdda27eb17
commit
71024cb255
@ -1545,7 +1545,7 @@ static void ft_rx_action(struct wpa_supplicant *wpa_s, const u8 *data,
|
|||||||
target_ap_addr, NULL, 0) < 0)
|
target_ap_addr, NULL, 0) < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* TODO: trigger re-association with the target AP */
|
sme_associate(wpa_s, WPAS_MODE_INFRA, target_ap_addr, WLAN_AUTH_FT);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211R */
|
#endif /* CONFIG_IEEE80211R */
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* wpa_supplicant - SME
|
* wpa_supplicant - SME
|
||||||
* Copyright (c) 2009, Jouni Malinen <j@w1.fi>
|
* Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
@ -239,7 +239,6 @@ void sme_authenticate(struct wpa_supplicant *wpa_s,
|
|||||||
|
|
||||||
void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data)
|
void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data)
|
||||||
{
|
{
|
||||||
struct wpa_driver_associate_params params;
|
|
||||||
struct wpa_ssid *ssid = wpa_s->current_ssid;
|
struct wpa_ssid *ssid = wpa_s->current_ssid;
|
||||||
|
|
||||||
if (ssid == NULL) {
|
if (ssid == NULL) {
|
||||||
@ -285,8 +284,18 @@ void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data)
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211R */
|
#endif /* CONFIG_IEEE80211R */
|
||||||
|
|
||||||
|
sme_associate(wpa_s, ssid->mode, data->auth.peer,
|
||||||
|
data->auth.auth_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode,
|
||||||
|
const u8 *bssid, u16 auth_type)
|
||||||
|
{
|
||||||
|
struct wpa_driver_associate_params params;
|
||||||
|
|
||||||
os_memset(¶ms, 0, sizeof(params));
|
os_memset(¶ms, 0, sizeof(params));
|
||||||
params.bssid = data->auth.peer;
|
params.bssid = bssid;
|
||||||
params.ssid = wpa_s->sme.ssid;
|
params.ssid = wpa_s->sme.ssid;
|
||||||
params.ssid_len = wpa_s->sme.ssid_len;
|
params.ssid_len = wpa_s->sme.ssid_len;
|
||||||
params.freq = wpa_s->sme.freq;
|
params.freq = wpa_s->sme.freq;
|
||||||
@ -294,12 +303,12 @@ void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data)
|
|||||||
wpa_s->sme.assoc_req_ie : NULL;
|
wpa_s->sme.assoc_req_ie : NULL;
|
||||||
params.wpa_ie_len = wpa_s->sme.assoc_req_ie_len;
|
params.wpa_ie_len = wpa_s->sme.assoc_req_ie_len;
|
||||||
#ifdef CONFIG_IEEE80211R
|
#ifdef CONFIG_IEEE80211R
|
||||||
if (data->auth.auth_type == WLAN_AUTH_FT && wpa_s->sme.ft_ies) {
|
if (auth_type == WLAN_AUTH_FT && wpa_s->sme.ft_ies) {
|
||||||
params.wpa_ie = wpa_s->sme.ft_ies;
|
params.wpa_ie = wpa_s->sme.ft_ies;
|
||||||
params.wpa_ie_len = wpa_s->sme.ft_ies_len;
|
params.wpa_ie_len = wpa_s->sme.ft_ies_len;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211R */
|
#endif /* CONFIG_IEEE80211R */
|
||||||
params.mode = ssid->mode;
|
params.mode = mode;
|
||||||
params.mgmt_frame_protection = wpa_s->sme.mfp;
|
params.mgmt_frame_protection = wpa_s->sme.mfp;
|
||||||
if (wpa_s->sme.prev_bssid_set)
|
if (wpa_s->sme.prev_bssid_set)
|
||||||
params.prev_bssid = wpa_s->sme.prev_bssid;
|
params.prev_bssid = wpa_s->sme.prev_bssid;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* wpa_supplicant - SME
|
* wpa_supplicant - SME
|
||||||
* Copyright (c) 2009, Jouni Malinen <j@w1.fi>
|
* Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
void sme_authenticate(struct wpa_supplicant *wpa_s,
|
void sme_authenticate(struct wpa_supplicant *wpa_s,
|
||||||
struct wpa_bss *bss, struct wpa_ssid *ssid);
|
struct wpa_bss *bss, struct wpa_ssid *ssid);
|
||||||
|
void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode,
|
||||||
|
const u8 *bssid, u16 auth_type);
|
||||||
void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data);
|
void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data);
|
||||||
int sme_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
|
int sme_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
|
||||||
const u8 *ies, size_t ies_len);
|
const u8 *ies, size_t ies_len);
|
||||||
|
Loading…
Reference in New Issue
Block a user