Commit 4be3bd8c authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

cfg80211: don't set privacy w/o key

When wpa_supplicant is used to connect to open networks,
it causes the wdev->wext.keys to point to key memory, but
that key memory is all empty. Only use privacy when there
is a default key to be used.
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Tested-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Tested-by: default avatarKalle Valo <kalle.valo@iki.fi>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 33de4f9d
...@@ -30,7 +30,8 @@ int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev, ...@@ -30,7 +30,8 @@ int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev,
if (wdev->wext.keys) { if (wdev->wext.keys) {
wdev->wext.keys->def = wdev->wext.default_key; wdev->wext.keys->def = wdev->wext.default_key;
wdev->wext.keys->defmgmt = wdev->wext.default_mgmt_key; wdev->wext.keys->defmgmt = wdev->wext.default_mgmt_key;
wdev->wext.connect.privacy = true; if (wdev->wext.default_key != -1)
wdev->wext.connect.privacy = true;
} }
if (!wdev->wext.connect.ssid_len) if (!wdev->wext.connect.ssid_len)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment