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>
This commit is contained in:
Deepthi Gowri 2013-04-26 17:56:24 +03:00 committed by Jouni Malinen
parent f59a10d405
commit 02db75b6c2
3 changed files with 13 additions and 0 deletions

View 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, int ft_action, const u8 *target_ap,
const u8 *ric_ies, size_t ric_ies_len); const u8 *ric_ies, size_t ric_ies_len);
int wpa_ft_is_completed(struct wpa_sm *sm); 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, int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies,
size_t ies_len, const u8 *src_addr); size_t ies_len, const u8 *src_addr);
int wpa_ft_start_over_ds(struct wpa_sm *sm, const u8 *target_ap, 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; return 0;
} }
static inline void wpa_reset_ft_completed(struct wpa_sm *sm)
{
}
static inline int static inline int
wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies, size_t ies_len, wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies, size_t ies_len,
const u8 *src_addr) const u8 *src_addr)

View 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, static int wpa_ft_process_gtk_subelem(struct wpa_sm *sm, const u8 *gtk_elem,
size_t gtk_elem_len) size_t gtk_elem_len)
{ {

View file

@ -2466,6 +2466,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
data->deauth_info.ie, data->deauth_info.ie,
data->deauth_info.ie_len); data->deauth_info.ie_len);
} }
wpa_reset_ft_completed(wpa_s->wpa);
} }
#ifdef CONFIG_AP #ifdef CONFIG_AP
if (wpa_s->ap_iface && data && data->deauth_info.addr) { if (wpa_s->ap_iface && data && data->deauth_info.addr) {