aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/sme.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-06-20 14:36:58 (GMT)
committerJouni Malinen <j@w1.fi>2015-06-20 14:36:58 (GMT)
commitee140ef98f18f3d8415dc64ce867c52686a13f7d (patch)
treee975d9814b8c23dfea60678e1e86590aa1737583 /wpa_supplicant/sme.c
parent50a19b010746430cc6ed2b792d16e8de50956680 (diff)
downloadhostap-ee140ef98f18f3d8415dc64ce867c52686a13f7d.zip
hostap-ee140ef98f18f3d8415dc64ce867c52686a13f7d.tar.gz
hostap-ee140ef98f18f3d8415dc64ce867c52686a13f7d.tar.bz2
FT: Stop association attempt if Auth response processing fails (SME)
Call the FT processing function directly instead of going through wpa_supplicant_event() to process FT Authentication frame in SME case. This allows parsing error to be used to trigger immediate failure for the connection instead of trying to proceed to reassociation step that cannot succeed. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/sme.c')
-rw-r--r--wpa_supplicant/sme.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 1788113..2f4dc5a 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -831,12 +831,20 @@ void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data)
#ifdef CONFIG_IEEE80211R
if (data->auth.auth_type == WLAN_AUTH_FT) {
- union wpa_event_data edata;
- os_memset(&edata, 0, sizeof(edata));
- edata.ft_ies.ies = data->auth.ies;
- edata.ft_ies.ies_len = data->auth.ies_len;
- os_memcpy(edata.ft_ies.target_ap, data->auth.peer, ETH_ALEN);
- wpa_supplicant_event(wpa_s, EVENT_FT_RESPONSE, &edata);
+ if (wpa_ft_process_response(wpa_s->wpa, data->auth.ies,
+ data->auth.ies_len, 0,
+ data->auth.peer, NULL, 0) < 0) {
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ "SME: FT Authentication response processing failed");
+ wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_DISCONNECTED "bssid="
+ MACSTR
+ " reason=%d locally_generated=1",
+ MAC2STR(wpa_s->pending_bssid),
+ WLAN_REASON_DEAUTH_LEAVING);
+ wpas_connection_failed(wpa_s, wpa_s->pending_bssid);
+ wpa_supplicant_mark_disassoc(wpa_s);
+ return;
+ }
}
#endif /* CONFIG_IEEE80211R */