]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
external-auth: Check key_mgmt when selecting SSID
authorCedric Izoard <Cedric.Izoard@ceva-dsp.com>
Mon, 26 Nov 2018 11:47:37 +0000 (11:47 +0000)
committerJouni Malinen <j@w1.fi>
Mon, 26 Nov 2018 17:09:25 +0000 (19:09 +0200)
When selecting SSID to start external authentication procedure also
check the key_mgmt field as several network configuration may be defined
for the same SSID/BSSID pair. The external authentication mechanism is
only available for SAE.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
wpa_supplicant/sme.c

index d569acad8ba4cb66cad255edec0b17a70e9eb0b5..a7e3bf28b98897822de557ac984fc0d54b716b1b 100644 (file)
@@ -958,7 +958,8 @@ static void sme_handle_external_auth_start(struct wpa_supplicant *wpa_s,
        for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next) {
                if (!wpas_network_disabled(wpa_s, ssid) &&
                    ssid_str_len == ssid->ssid_len &&
-                   os_memcmp(ssid_str, ssid->ssid, ssid_str_len) == 0)
+                   os_memcmp(ssid_str, ssid->ssid, ssid_str_len) == 0 &&
+                   (ssid->key_mgmt & WPA_KEY_MGMT_SAE))
                        break;
        }
        if (ssid)