aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepthi Gowri <deepthi@codeaurora.org>2013-04-26 14:56:24 (GMT)
committerJouni Malinen <j@w1.fi>2013-04-26 14:56:24 (GMT)
commit02db75b6c2563ba8b8870ff39f6ad75d32d7f0d7 (patch)
tree727d65254f6e85f6c2271159922b13ab677621d9
parentf59a10d405769b2590ba1763f2355167c2e11245 (diff)
downloadhostap-02db75b6c2563ba8b8870ff39f6ad75d32d7f0d7.zip
hostap-02db75b6c2563ba8b8870ff39f6ad75d32d7f0d7.tar.gz
hostap-02db75b6c2563ba8b8870ff39f6ad75d32d7f0d7.tar.bz2
FT: Reset FT flag upon STA deauthentication
Reset ft_completed if STA receives deauthentication between FT reassoc success and the subsequent initial mobility authentication and association. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--src/rsn_supp/wpa.h5
-rw-r--r--src/rsn_supp/wpa_ft.c7
-rw-r--r--wpa_supplicant/events.c1
3 files changed, 13 insertions, 0 deletions
diff --git a/src/rsn_supp/wpa.h b/src/rsn_supp/wpa.h
index dbb493e..d4533a8 100644
--- a/src/rsn_supp/wpa.h
+++ b/src/rsn_supp/wpa.h
@@ -315,6 +315,7 @@ int wpa_ft_process_response(struct wpa_sm *sm, const u8 *ies, size_t ies_len,
int ft_action, const u8 *target_ap,
const u8 *ric_ies, size_t ric_ies_len);
int wpa_ft_is_completed(struct wpa_sm *sm);
+void wpa_reset_ft_completed(struct wpa_sm *sm);
int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies,
size_t ies_len, const u8 *src_addr);
int wpa_ft_start_over_ds(struct wpa_sm *sm, const u8 *target_ap,
@@ -346,6 +347,10 @@ static inline int wpa_ft_is_completed(struct wpa_sm *sm)
return 0;
}
+static inline void wpa_reset_ft_completed(struct wpa_sm *sm)
+{
+}
+
static inline int
wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies, size_t ies_len,
const u8 *src_addr)
diff --git a/src/rsn_supp/wpa_ft.c b/src/rsn_supp/wpa_ft.c
index 4b08a62..6b7fa91 100644
--- a/src/rsn_supp/wpa_ft.c
+++ b/src/rsn_supp/wpa_ft.c
@@ -534,6 +534,13 @@ int wpa_ft_is_completed(struct wpa_sm *sm)
}
+void wpa_reset_ft_completed(struct wpa_sm *sm)
+{
+ if (sm != NULL)
+ sm->ft_completed = 0;
+}
+
+
static int wpa_ft_process_gtk_subelem(struct wpa_sm *sm, const u8 *gtk_elem,
size_t gtk_elem_len)
{
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 55a4d7c..887acb2 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -2466,6 +2466,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
data->deauth_info.ie,
data->deauth_info.ie_len);
}
+ wpa_reset_ft_completed(wpa_s->wpa);
}
#ifdef CONFIG_AP
if (wpa_s->ap_iface && data && data->deauth_info.addr) {