Commit:     48225709bec68c2d8612718922f974f22214a308
Parent:     c9927c2bf4f45bb85e8b502ab3fb79ad6483c244
Author:     Michael Wu <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 19 17:14:36 2007 -0400
Committer:  John W. Linville <[EMAIL PROTECTED]>
CommitDate: Thu Oct 25 22:32:05 2007 -0400

    [PATCH] mac80211: Fix SSID matching in AP selection
    The length of the SSID desired should also be compared in addition to
    the memcmp of the SSIDs.
    Thanks to Andrea Merello <[EMAIL PROTECTED]> for finding this issue.
    Signed-off-by: Michael Wu <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
 net/mac80211/ieee80211_sta.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index f7ffeec..77ef223 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -2096,7 +2096,8 @@ static int ieee80211_sta_match_ssid(struct 
ieee80211_if_sta *ifsta,
        int tmp, hidden_ssid;
-       if (!memcmp(ifsta->ssid, ssid, ssid_len))
+       if (ssid_len == ifsta->ssid_len &&
+           !memcmp(ifsta->ssid, ssid, ssid_len))
                return 1;
        if (ifsta->flags & IEEE80211_STA_AUTO_BSSID_SEL)
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to