FT: Reset FT flag upon STA deauthentication
authorDeepthi Gowri <deepthi@codeaurora.org>
Fri, 26 Apr 2013 14:56:24 +0000 (17:56 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 26 Apr 2013 14:56:24 +0000 (17:56 +0300)
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>

src/rsn_supp/wpa.h
src/rsn_supp/wpa_ft.c
wpa_supplicant/events.c

index dbb493e..d4533a8 100644 (file)
@@ -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)
index 4b08a62..6b7fa91 100644 (file)
@@ -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)
 {
index 55a4d7c..887acb2 100644 (file)
@@ -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) {