diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-30 13:18:53 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-30 13:18:53 -0700 |
commit | 2a64cc4b793f8a84969401afe5a28bd08bc20c9b (patch) | |
tree | 8a0233feae22b5c7e49bc6526579207f333922aa /net | |
parent | aebb6a849cfe7d89bcacaaecc20a480dfc1180e7 (diff) | |
parent | 23976efedd5ecb420b87455787c537eb4aed1981 (diff) | |
download | linux-2a64cc4b793f8a84969401afe5a28bd08bc20c9b.tar.gz linux-2a64cc4b793f8a84969401afe5a28bd08bc20c9b.tar.bz2 linux-2a64cc4b793f8a84969401afe5a28bd08bc20c9b.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/wext.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index 6106cb79060c..e8404212ad57 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c @@ -95,6 +95,13 @@ static int ieee80211_set_encryption(struct net_device *dev, u8 *sta_addr, } } + if (alg == ALG_WEP && + key_len != LEN_WEP40 && key_len != LEN_WEP104) { + ieee80211_key_free(key); + err = -EINVAL; + goto out_unlock; + } + ieee80211_key_link(key, sdata, sta); if (set_tx_key || (!sta && !sdata->default_key && key)) |