From a1dc44ae042378c2bdf064180fd1cc379607fc4b Mon Sep 17 00:00:00 2001
From: Aymen KLOUZ <aymenx.klouz@intel.com>
Date: Fri, 20 Sep 2013 11:11:42 +0200
Subject: [PATCH] BZ: 122181
Category: [device enablement | feature differentiation | aosp improvement]
Domain: <domain>-<sub-domain>
Origin: [internal | upstream <uri> | 3rd-party <name>]
Upstream-Candidate: [yes | no, needs rework | no, proprietary | no, not-aosp]
Change-Id: I945f43c7fa0da190a341cdf70fbff6f1498d8065
Signed-off-by: Aymen KLOUZ <aymenx.klouz@intel.com>
---
wpa_supplicant/events.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
@@ -372,6 +372,7 @@ static int wpa_supplicant_ssid_bss_match(struct wpa_supplicant *wpa_s,
const u8 *rsn_ie, *wpa_ie;
int ret;
int wep_ok;
+ Boolean keymgmt_mismatch = FALSE;
ret = wpas_wps_ssid_bss_match(wpa_s, ssid, bss);
if (ret >= 0)
@@ -422,6 +423,7 @@ static int wpa_supplicant_ssid_bss_match(struct wpa_supplicant *wpa_s,
if (!(ie.key_mgmt & ssid->key_mgmt)) {
wpa_dbg(wpa_s, MSG_DEBUG, " skip RSN IE - key mgmt "
"mismatch");
+ keymgmt_mismatch = TRUE;
break;
}
@@ -479,6 +481,7 @@ static int wpa_supplicant_ssid_bss_match(struct wpa_supplicant *wpa_s,
if (!(ie.key_mgmt & ssid->key_mgmt)) {
wpa_dbg(wpa_s, MSG_DEBUG, " skip WPA IE - key mgmt "
"mismatch");
+ keymgmt_mismatch = TRUE;
break;
}
@@ -498,7 +501,7 @@ static int wpa_supplicant_ssid_bss_match(struct wpa_supplicant *wpa_s,
return 0;
}
- if (!wpa_key_mgmt_wpa(ssid->key_mgmt)) {
+ if (!wpa_key_mgmt_wpa(ssid->key_mgmt) && !keymgmt_mismatch) {
wpa_dbg(wpa_s, MSG_DEBUG, " allow in non-WPA/WPA2");
return 1;
}
--
1.8.1.2