summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-06-30 13:18:53 -0700
committerDavid S. Miller <davem@davemloft.net>2008-06-30 13:18:53 -0700
commit2a64cc4b793f8a84969401afe5a28bd08bc20c9b (patch)
tree8a0233feae22b5c7e49bc6526579207f333922aa /net
parentaebb6a849cfe7d89bcacaaecc20a480dfc1180e7 (diff)
parent23976efedd5ecb420b87455787c537eb4aed1981 (diff)
downloadlinux-2a64cc4b793f8a84969401afe5a28bd08bc20c9b.tar.bz2
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.c7
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))