aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-03-13 19:13:18 (GMT)
committerJouni Malinen <j@w1.fi>2010-03-13 19:13:18 (GMT)
commit62c72d729997c57df821764a7b287efffc5b32e7 (patch)
treefc9ea8a00cefdb28bbf04a4e9506c4b9746d80e4
parent0e84c25434e6a1f283c7b4e62e483729085b78d2 (diff)
downloadhostap-62c72d729997c57df821764a7b287efffc5b32e7.zip
hostap-62c72d729997c57df821764a7b287efffc5b32e7.tar.gz
hostap-62c72d729997c57df821764a7b287efffc5b32e7.tar.bz2
FT: Process reassoc resp FT IEs when using wpa_supplicant SME
-rw-r--r--wpa_supplicant/events.c16
-rw-r--r--wpa_supplicant/sme.c1
-rw-r--r--wpa_supplicant/wpa_supplicant_i.h1
3 files changed, 18 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 8e04248..3604454 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1024,6 +1024,21 @@ static void wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
wpa_sm_set_assoc_wpa_ie(wpa_s->wpa, NULL, 0);
#ifdef CONFIG_IEEE80211R
+#ifdef CONFIG_SME
+ if (wpa_s->sme.auth_alg == WPA_AUTH_ALG_FT) {
+ u8 bssid[ETH_ALEN];
+ if (wpa_drv_get_bssid(wpa_s, bssid) < 0 ||
+ wpa_ft_validate_reassoc_resp(wpa_s->wpa,
+ data->assoc_info.resp_ies,
+ data->assoc_info.resp_ies_len,
+ bssid) < 0) {
+ wpa_printf(MSG_DEBUG, "FT: Validation of "
+ "Reassociation Response failed");
+ /* TODO: force disconnection? */
+ }
+ }
+#endif /* CONFIG_SME */
+
p = data->assoc_info.resp_ies;
l = data->assoc_info.resp_ies_len;
@@ -1551,6 +1566,7 @@ static void ft_rx_action(struct wpa_supplicant *wpa_s, const u8 *data,
bss = wpa_bss_get_bssid(wpa_s, target_ap_addr);
if (bss)
wpa_s->sme.freq = bss->freq;
+ wpa_s->sme.auth_alg = WPA_AUTH_ALG_FT;
sme_associate(wpa_s, WPAS_MODE_INFRA, target_ap_addr,
WLAN_AUTH_FT);
}
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 1853d23..f3bd3bb 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -222,6 +222,7 @@ void sme_authenticate(struct wpa_supplicant *wpa_s,
if (old_ssid != wpa_s->current_ssid)
wpas_notify_network_changed(wpa_s);
+ wpa_s->sme.auth_alg = params.auth_alg;
if (wpa_drv_authenticate(wpa_s, &params) < 0) {
wpa_msg(wpa_s, MSG_INFO, "Authentication request to the "
"driver failed");
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index bc56517..49ae1cc 100644
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
@@ -414,6 +414,7 @@ struct wpa_supplicant {
size_t ft_ies_len;
u8 prev_bssid[ETH_ALEN];
int prev_bssid_set;
+ int auth_alg;
} sme;
#endif /* CONFIG_SME */