From 957bff83c4be0aa76876851e2edde2489c8ab3d1 Mon Sep 17 00:00:00 2001 From: Jeffin Mammen Date: Fri, 21 Apr 2017 21:01:03 +0300 Subject: [PATCH] FILS: Add driver-AP SME callback to set TK after association Signed-off-by: Jouni Malinen --- src/ap/drv_callbacks.c | 6 ++++++ src/ap/wpa_auth.c | 10 ++++++++++ src/ap/wpa_auth.h | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c index 331bf9e09..2b962f11f 100644 --- a/src/ap/drv_callbacks.c +++ b/src/ap/drv_callbacks.c @@ -398,6 +398,12 @@ skip_wpa_check: if (reassoc && (sta->auth_alg == WLAN_AUTH_FT)) wpa_auth_sm_event(sta->wpa_sm, WPA_ASSOC_FT); +#ifdef CONFIG_FILS + else if (sta->auth_alg == WLAN_AUTH_FILS_SK || + sta->auth_alg == WLAN_AUTH_FILS_SK_PFS || + sta->auth_alg == WLAN_AUTH_FILS_PK) + wpa_auth_sm_event(sta->wpa_sm, WPA_ASSOC_FILS); +#endif /* CONFIG_FILS */ else wpa_auth_sm_event(sta->wpa_sm, WPA_ASSOC); diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c index 24b1241e1..3149da4ea 100644 --- a/src/ap/wpa_auth.c +++ b/src/ap/wpa_auth.c @@ -1761,6 +1761,16 @@ int wpa_auth_sm_event(struct wpa_state_machine *sm, enum wpa_event event) #else /* CONFIG_IEEE80211R_AP */ break; #endif /* CONFIG_IEEE80211R_AP */ + case WPA_ASSOC_FILS: +#ifdef CONFIG_FILS + wpa_printf(MSG_DEBUG, + "FILS: TK configuration after association"); + fils_set_tk(sm); + sm->fils_completed = 1; + return 0; +#else /* CONFIG_FILS */ + break; +#endif /* CONFIG_FILS */ } #ifdef CONFIG_IEEE80211R_AP diff --git a/src/ap/wpa_auth.h b/src/ap/wpa_auth.h index 9a1d9d70f..a16a56036 100644 --- a/src/ap/wpa_auth.h +++ b/src/ap/wpa_auth.h @@ -275,7 +275,7 @@ void wpa_receive(struct wpa_authenticator *wpa_auth, u8 *data, size_t data_len); enum wpa_event { WPA_AUTH, WPA_ASSOC, WPA_DISASSOC, WPA_DEAUTH, WPA_REAUTH, - WPA_REAUTH_EAPOL, WPA_ASSOC_FT + WPA_REAUTH_EAPOL, WPA_ASSOC_FT, WPA_ASSOC_FILS }; void wpa_remove_ptk(struct wpa_state_machine *sm); int wpa_auth_sm_event(struct wpa_state_machine *sm, enum wpa_event event);