mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
cfg80211: wext: only allow WEP keys to be configured before connected
When not connected, anything but WEP keys shouldn't be allowed to be configured for later - only static WEP keys make sense at this point. Change wext to reject anything else just like nl80211 does. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
386b1f2738
commit
9381e267b6
1 changed files with 3 additions and 0 deletions
|
@ -487,6 +487,9 @@ static int __cfg80211_set_encryption(struct cfg80211_registered_device *rdev,
|
|||
err = 0;
|
||||
if (wdev->current_bss)
|
||||
err = rdev_add_key(rdev, dev, idx, pairwise, addr, params);
|
||||
else if (params->cipher != WLAN_CIPHER_SUITE_WEP40 &&
|
||||
params->cipher != WLAN_CIPHER_SUITE_WEP104)
|
||||
return -EINVAL;
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
|
Loading…
Reference in a new issue