Skip to content

Commit

Permalink
wlcore: compare ssid_len before comparing ssids
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Luciano Coelho <coelho@ti.com>
  • Loading branch information
Eliad Peller authored and Luciano Coelho committed Jun 6, 2012
1 parent 78f85f5 commit 587cc28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/wireless/ti/wlcore/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,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 =
Expand Down

0 comments on commit 587cc28

Please sign in to comment.