]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Interworking: Allow FT to be used for connection
authorJouni Malinen <j@w1.fi>
Sat, 10 May 2014 13:15:20 +0000 (16:15 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 10 May 2014 13:15:20 +0000 (16:15 +0300)
This extends Interworking network selection to enable FT-EAP as an
optional key_mgmt value to allow FT to be used instead of hardcoding
WPA2-Enterprise without FT.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/interworking.c

index f46c4cfc8b4fc0649e4fc945192018bdf3b11284..a8ecb8cc2ab56511b35d6e9dc43a38dbfa4bb48c 100644 (file)
@@ -27,6 +27,7 @@
 #include "bss.h"
 #include "scan.h"
 #include "notify.h"
+#include "driver_i.h"
 #include "gas_query.h"
 #include "hs20_supplicant.h"
 #include "interworking.h"
@@ -875,9 +876,23 @@ static void remove_duplicate_network(struct wpa_supplicant *wpa_s,
 static int interworking_set_hs20_params(struct wpa_supplicant *wpa_s,
                                        struct wpa_ssid *ssid)
 {
-       if (wpa_config_set(ssid, "key_mgmt",
-                          wpa_s->conf->pmf != NO_MGMT_FRAME_PROTECTION ?
-                          "WPA-EAP WPA-EAP-SHA256" : "WPA-EAP", 0) < 0)
+       const char *key_mgmt = NULL;
+#ifdef CONFIG_IEEE80211R
+       int res;
+       struct wpa_driver_capa capa;
+
+       res = wpa_drv_get_capa(wpa_s, &capa);
+       if (res == 0 && capa.key_mgmt & WPA_DRIVER_CAPA_KEY_MGMT_FT) {
+               key_mgmt = wpa_s->conf->pmf != NO_MGMT_FRAME_PROTECTION ?
+                       "WPA-EAP WPA-EAP-SHA256 FT-EAP" :
+                       "WPA-EAP FT-EAP";
+       }
+#endif /* CONFIG_IEEE80211R */
+
+       if (!key_mgmt)
+               key_mgmt = wpa_s->conf->pmf != NO_MGMT_FRAME_PROTECTION ?
+                       "WPA-EAP WPA-EAP-SHA256" : "WPA-EAP";
+       if (wpa_config_set(ssid, "key_mgmt", key_mgmt, 0) < 0)
                return -1;
        if (wpa_config_set(ssid, "proto", "RSN", 0) < 0)
                return -1;