Skip to contentSkip to conversation

cfg80211: fix wext setting SSID

PATCH In review Johannes Berg 2 participants 2 messages Jul 10, 2009 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 cfg80211: fix wext setting SSID

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.

---
*sigh*
tons of stupid mistakes

 net/wireless/wext-sme.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/wext-sme.c +1 -1
@@ -166,7 +166,7 @@ int cfg80211_mgd_wext_siwessid(struct ne
 
 	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) {
Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · Johannes Berg

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.

Quoted 2 lines

*sigh*
tons of stupid mistakes

Two mistakes less. Thank you!

Signature · 2 lines
Regards,
Pavel Roskin