external-auth: Check key_mgmt when selecting SSID

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>
This commit is contained in:
Cedric Izoard 2018-11-26 11:47:37 +00:00 committed by Jouni Malinen
parent a302384148
commit 18a0508a41

View 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)