Fix WPA/WPA2 AP rejection on parameter mismatch

If WPA/WPA2 was enabled in the configuration, the non-WPA exception
could allow an incorrect AP to be selected from scan results. Do
not use the exception if WPA/WPA2 is enabled in configuration.
This commit is contained in:
Jouni Malinen 2011-04-08 19:13:58 +03:00 committed by Jouni Malinen
parent 03d3f28a69
commit c2f1fe41c2

View file

@ -435,8 +435,15 @@ static int wpa_supplicant_ssid_bss_match(struct wpa_supplicant *wpa_s,
return 0; return 0;
} }
/* Allow in non-WPA configuration */ if (!wpa_key_mgmt_wpa(ssid->key_mgmt)) {
return 1; wpa_dbg(wpa_s, MSG_DEBUG, " allow in non-WPA/WPA2");
return 1;
}
wpa_dbg(wpa_s, MSG_DEBUG, " reject due to mismatch with "
"WPA/WPA2");
return 0;
} }