cfg80211: fix wext setting SSID
authorJohannes Berg <johannes@sipsolutions.net>
Fri, 10 Jul 2009 16:35:49 +0000 (18:35 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 24 Jul 2009 19:05:11 +0000 (15:05 -0400)
Pavel reported that you can't set the SSID from "foo" to
"bar". I tried reproducing, but used different values,
with different lengths, and thus never saw the obvious
problem.

Reported-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/wext-sme.c

index cd5764fd001a2002b62cb9344d01c44edc3d4312..82e913aa163ea636317c01b4282adc15d3fb1e9e 100644 (file)
@@ -166,7 +166,7 @@ int cfg80211_mgd_wext_siwessid(struct net_device *dev,
 
        if (wdev->wext.connect.ssid && len &&
            len == wdev->wext.connect.ssid_len &&
-           memcmp(wdev->wext.connect.ssid, ssid, len))
+           memcmp(wdev->wext.connect.ssid, ssid, len) == 0)
                goto out;
 
        if (wdev->sme_state != CFG80211_SME_IDLE) {