Fix wpa_supplicant_ssid_bss_match() handler for non-WPA

The proto configuration may be left to non-zero when moving from one
configuration to another. To avoid misidentifying a network
configuration as enabling WPA, check key_mgmt field, too.
This commit is contained in:
Jouni Malinen 2010-12-30 18:27:33 +02:00 committed by Jouni Malinen
parent dcc8bf7808
commit df83fb7d00

View file

@ -421,7 +421,7 @@ static int wpa_supplicant_ssid_bss_match(struct wpa_supplicant *wpa_s,
}
if ((ssid->proto & (WPA_PROTO_WPA | WPA_PROTO_RSN)) &&
proto_match == 0) {
wpa_key_mgmt_wpa(ssid->key_mgmt) && proto_match == 0) {
wpa_printf(MSG_DEBUG, " skip - no WPA/RSN proto match");
return 0;
}