Skip to content

Commit

Permalink
cfg80211: don't set privacy w/o key
Browse files Browse the repository at this point in the history
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: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Tested-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
jmberg authored and linvjw committed Sep 28, 2009
1 parent 33de4f9 commit 4be3bd8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/wireless/wext-sme.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev,
if (wdev->wext.keys) {
wdev->wext.keys->def = wdev->wext.default_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)
Expand Down

0 comments on commit 4be3bd8

Please sign in to comment.