On Mon, Nov 26, 2018 at 07:43:59AM +0000, Cedric Izoard wrote: > 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. > diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c > @@ -971,7 +971,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; This does not look correct to me.. ssid->key_mgmt is a bitfield of enabled options. Comparing it to a single one (WPA_KEY_MGMT_SAE) would mean that any network profile with both SAE and something else enabled, e.g., the common transition mode option with WPA_KEY_MGMT_PSK, would be skipped. Shouldn't this be (ssid->key_mgmt & WPA_KEY_MGMT_SAE) instead? -- Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap