diff mbox

Fixed a bug in identifying the HS20 Network

Message ID CAAdcsmtkO2mNo-MSd76mz3GQO0Q9UV14bRb+rPRY1sHVo9nJRA@mail.gmail.com
State Changes Requested
Headers show

Commit Message

Shyam July 4, 2014, 5:01 p.m. UTC
Fixed bug in identifying the RSN attribute. In some case the proto field
might have value - RSN|WPA in which case this check fails.

Signed-off-by: Shyam <shyam.kyo@gmail.com>
---
 wpa_supplicant/hs20_supplicant.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

     return 1;

Comments

Jouni Malinen July 4, 2014, 5:17 p.m. UTC | #1
On Fri, Jul 04, 2014 at 10:31:18PM +0530, Shyam wrote:
> Fixed bug in identifying the RSN attribute. In some case the proto field
> might have value - RSN|WPA in which case this check fails.

Could you please clarify what such cases would be? Hotspot 2.0 requires
WPA2-Enterprise to be used and setting the proto field to include WPA
would not be compliant with that requirement. In other words, this check
is done on purpose against the exact value of WPA_PROTO_RSN and not just
for that bit being set.
diff mbox

Patch

From cca070557b739c791cc42a2f2ae0a3ed876a29f7 Mon Sep 17 00:00:00 2001
From: Shyam <shyam.kyo@gmail.com>
Date: Fri, 4 Jul 2014 21:43:09 +0530
Subject: [PATCH] Fixed bug in identifying the RSN attribute. In some case the
 proto field might have value - RSN|WPA in which case this
 check fails.

Signed-off-by: Shyam <shyam.kyo@gmail.com>
---
 wpa_supplicant/hs20_supplicant.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wpa_supplicant/hs20_supplicant.c b/wpa_supplicant/hs20_supplicant.c
index 257aa6d..c1c3591 100644
--- a/wpa_supplicant/hs20_supplicant.c
+++ b/wpa_supplicant/hs20_supplicant.c
@@ -98,7 +98,7 @@  int is_hs20_network(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
 		return 0;
 	if (!(ssid->pairwise_cipher & WPA_CIPHER_CCMP))
 		return 0;
-	if (ssid->proto != WPA_PROTO_RSN)
+	if (!(ssid->proto & WPA_PROTO_RSN))
 		return 0;
 
 	return 1;
-- 
1.7.9.5