From: Johannes Berg Date: Wed, 21 Jul 2010 08:09:25 +0000 (+0200) Subject: mac80211: refuse shared key auth when WEP is unavailable X-Git-Tag: firefly_0821_release~9833^2~1306^2~107^2~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9dca9c490146e787472bc05b264e043311a4c67b;p=firefly-linux-kernel-4.4.55.git mac80211: refuse shared key auth when WEP is unavailable When WEP is not available, we should reject shared key authentication because it could never succeed. Signed-off-by: Johannes Berg Signed-off-by: John W. Linville --- diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 7a4e4bffbc71..cf8d72196c65 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2031,6 +2031,8 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata, auth_alg = WLAN_AUTH_OPEN; break; case NL80211_AUTHTYPE_SHARED_KEY: + if (IS_ERR(sdata->local->wep_tx_tfm)) + return -EOPNOTSUPP; auth_alg = WLAN_AUTH_SHARED_KEY; break; case NL80211_AUTHTYPE_FT: