diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-30 22:18:53 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-30 22:18:53 +0200 |
commit | 2a64cc4b793f8a84969401afe5a28bd08bc20c9b (patch) | |
tree | 8a0233feae22b5c7e49bc6526579207f333922aa /net | |
parent | textsearch: fix Boyer-Moore text search bug (diff) | |
parent | mac80211: don't accept WEP keys other than WEP40 and WEP104 (diff) | |
download | linux-2a64cc4b793f8a84969401afe5a28bd08bc20c9b.tar.xz 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)) |