From: Jouni Malinen Date: Thu, 30 Dec 2010 16:27:33 +0000 (+0200) Subject: Fix wpa_supplicant_ssid_bss_match() handler for non-WPA X-Git-Tag: hostap-1-bp~660 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df83fb7d00dc50c72ba7a5f5f0e313649619e5a2;p=thirdparty%2Fhostap.git 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. --- 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; }