]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
FILS: Update cache identifier on association
authorVidyullatha Kanchanapally <vkanchan@qti.qualcomm.com>
Wed, 22 Mar 2017 10:40:05 +0000 (16:10 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 7 Apr 2017 15:59:12 +0000 (18:59 +0300)
This is needed when offloading FILS shared key to the drivers.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/rsn_supp/wpa.c
src/rsn_supp/wpa.h
wpa_supplicant/events.c

index 67ec80c2f1b4c700fbe62d106e614246a40e5133..6d91142942e7aa6d44dd3ac5e197de735441fab6 100644 (file)
@@ -4073,3 +4073,14 @@ int owe_process_assoc_resp(struct wpa_sm *sm, const u8 *resp_ies,
 }
 
 #endif /* CONFIG_OWE */
+
+
+void wpa_sm_set_fils_cache_id(struct wpa_sm *sm, const u8 *fils_cache_id)
+{
+#ifdef CONFIG_FILS
+       if (sm && fils_cache_id) {
+               sm->fils_cache_id_set = 1;
+               os_memcpy(sm->fils_cache_id, fils_cache_id, FILS_CACHE_ID_LEN);
+       }
+#endif /* CONFIG_FILS */
+}
index 3368d93657dd3341fea07fcf5c613750c400a291..bee1c9221274159c56316b65220a8e5e2c01db39 100644 (file)
@@ -455,5 +455,6 @@ int owe_process_assoc_resp(struct wpa_sm *sm, const u8 *resp_ies,
                           size_t resp_ies_len);
 
 void wpa_sm_set_reset_fils_completed(struct wpa_sm *sm, int set);
+void wpa_sm_set_fils_cache_id(struct wpa_sm *sm, const u8 *fils_cache_id);
 
 #endif /* WPA_H */
index fcfd3bcd6dcf0dcd2d63e57abdd4c7e6a3cec36d..e6f6b000e754ca3f79f0dcedfaffd5701269e0b6 100644 (file)
@@ -2653,6 +2653,16 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
                if (wpa_s->reassoc_same_bss)
                        wmm_ac_restore_tspecs(wpa_s);
        }
+
+#ifdef CONFIG_FILS
+       if (wpa_key_mgmt_fils(wpa_s->key_mgmt)) {
+               struct wpa_bss *bss = wpa_bss_get_bssid(wpa_s, bssid);
+               const u8 *fils_cache_id = wpa_bss_get_fils_cache_id(bss);
+
+               if (fils_cache_id)
+                       wpa_sm_set_fils_cache_id(wpa_s->wpa, fils_cache_id);
+       }
+#endif /* CONFIG_FILS */
 }