From df83fb7d00dc50c72ba7a5f5f0e313649619e5a2 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 30 Dec 2010 18:27:33 +0200 Subject: [PATCH] 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. --- wpa_supplicant/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 201c33928..f1fa2cfa7 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -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; }