]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix wpa_supplicant_ssid_bss_match() handler for non-WPA
authorJouni Malinen <jouni.malinen@atheros.com>
Thu, 30 Dec 2010 16:27:33 +0000 (18:27 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 30 Dec 2010 16:27:33 +0000 (18:27 +0200)
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.

wpa_supplicant/events.c

index 201c33928cf72b4fb0596b5abffa2fb02316ae8c..f1fa2cfa7f4a04dff767e973652fa2190b17a13b 100644 (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;
        }