Skip to content

Commit

Permalink
cfg80211: fix IBSS default management key
Browse files Browse the repository at this point in the history
When wireless extensions are used to control
an encrypted IBSS, we erroneously can try to
set the default management key. Fix this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 26, 2010
1 parent 66c5242 commit 3be61a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/wireless/ibss.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,10 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev,
if (!netif_running(wdev->netdev))
return 0;

if (wdev->wext.keys)
if (wdev->wext.keys) {
wdev->wext.keys->def = wdev->wext.default_key;
wdev->wext.keys->defmgmt = wdev->wext.default_mgmt_key;
}

wdev->wext.ibss.privacy = wdev->wext.default_key != -1;

Expand Down

0 comments on commit 3be61a3

Please sign in to comment.