linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wlcore: compare ssid_len before comparing ssids
@ 2012-05-15 15:31 Eliad Peller
  2012-06-06 17:06 ` Luciano Coelho
  0 siblings, 1 reply; 2+ messages in thread
From: Eliad Peller @ 2012-05-15 15:31 UTC (permalink / raw)
  To: Luciano Coelho; +Cc: linux-wireless

When comparing 2 ssids the ssid_len must be taken
into account. Otherwise, a substring will be treated
as equal.

This bug might cause ssids to get scanned as
public ssids (rather than hidden), resulting in
broadcast probe request (instead of ssid-specific
ones)

Signed-off-by: Eliad Peller <eliad@wizery.com>
---
 drivers/net/wireless/ti/wlcore/scan.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ti/wlcore/scan.c b/drivers/net/wireless/ti/wlcore/scan.c
index ade21a0..267a3a3 100644
--- a/drivers/net/wireless/ti/wlcore/scan.c
+++ b/drivers/net/wireless/ti/wlcore/scan.c
@@ -603,7 +603,9 @@ wl12xx_scan_sched_scan_ssid_list(struct wl1271 *wl,
 					continue;
 
 				for (j = 0; j < cmd->n_ssids; j++)
-					if (!memcmp(req->ssids[i].ssid,
+					if ((req->ssids[i].ssid_len ==
+					     req->ssids[j].ssid_len) &&
+					    !memcmp(req->ssids[i].ssid,
 						   cmd->ssids[j].ssid,
 						   req->ssids[i].ssid_len)) {
 						cmd->ssids[j].type =
-- 
1.7.6.401.g6a319


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] wlcore: compare ssid_len before comparing ssids
  2012-05-15 15:31 [PATCH] wlcore: compare ssid_len before comparing ssids Eliad Peller
@ 2012-06-06 17:06 ` Luciano Coelho
  0 siblings, 0 replies; 2+ messages in thread
From: Luciano Coelho @ 2012-06-06 17:06 UTC (permalink / raw)
  To: Eliad Peller; +Cc: linux-wireless

On Tue, 2012-05-15 at 18:31 +0300, Eliad Peller wrote:
> When comparing 2 ssids the ssid_len must be taken
> into account. Otherwise, a substring will be treated
> as equal.
> 
> This bug might cause ssids to get scanned as
> public ssids (rather than hidden), resulting in
> broadcast probe request (instead of ssid-specific
> ones)
> 
> Signed-off-by: Eliad Peller <eliad@wizery.com>
> ---

Applied and pushed to wl12xx.git/master.

--
Luca.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-06 17:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-15 15:31 [PATCH] wlcore: compare ssid_len before comparing ssids Eliad Peller
2012-06-06 17:06 ` Luciano Coelho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).