]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
FILS: Specify if FILS HLP was sent in connect
authorVidyullatha Kanchanapally <vkanchan@qti.qualcomm.com>
Thu, 20 Apr 2017 12:08:49 +0000 (17:38 +0530)
committerJouni Malinen <j@w1.fi>
Sat, 29 Apr 2017 13:35:23 +0000 (16:35 +0300)
This adds a string "FILS_HLP_SENT" to connect event when HLP is sent
as part of ASSOC/CONNECT request.

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

index 03948ec54e8abd3427c49209a0b3e1104e46b13e..023fe200a94ee1183bda626127b161436721ef58 100644 (file)
@@ -165,6 +165,10 @@ static inline int wpa_key_mgmt_cckm(int akm)
 #define WPA_AUTH_ALG_FILS BIT(5)
 #define WPA_AUTH_ALG_FILS_SK_PFS BIT(6)
 
+static inline int wpa_auth_alg_fils(int alg)
+{
+       return !!(alg & (WPA_AUTH_ALG_FILS | WPA_AUTH_ALG_FILS_SK_PFS));
+}
 
 enum wpa_alg {
        WPA_ALG_NONE,
index 3456798a35ef966d10fc77e2e14ab1a70904ec2c..6d8ef11c8d744c8b6c9e9e76a5d97feab54ce714 100644 (file)
@@ -837,12 +837,24 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
 
        if (state == WPA_COMPLETED && wpa_s->new_connection) {
                struct wpa_ssid *ssid = wpa_s->current_ssid;
+               int fils_hlp_sent = 0;
+
+#ifdef CONFIG_SME
+               if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) &&
+                   wpa_auth_alg_fils(wpa_s->sme.auth_alg))
+                       fils_hlp_sent = 1;
+#endif /* CONFIG_SME */
+               if (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) &&
+                   wpa_auth_alg_fils(wpa_s->auth_alg))
+                       fils_hlp_sent = 1;
+
 #if defined(CONFIG_CTRL_IFACE) || !defined(CONFIG_NO_STDOUT_DEBUG)
                wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_CONNECTED "- Connection to "
-                       MACSTR " completed [id=%d id_str=%s]",
+                       MACSTR " completed [id=%d id_str=%s%s]",
                        MAC2STR(wpa_s->bssid),
                        ssid ? ssid->id : -1,
-                       ssid && ssid->id_str ? ssid->id_str : "");
+                       ssid && ssid->id_str ? ssid->id_str : "",
+                       fils_hlp_sent ? " FILS_HLP_SENT" : "");
 #endif /* CONFIG_CTRL_IFACE || !CONFIG_NO_STDOUT_DEBUG */
                wpas_clear_temp_disabled(wpa_s, ssid, 1);
                wpa_blacklist_clear(wpa_s);