From a2e537684dd4a5381468e8c1db0d4a4835490978 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 10 Aug 2010 09:46:42 +0200 Subject: [PATCH] --- yaml --- r: 214013 b: refs/heads/master c: afea0b7af7a0c070da8b2029d721abc930e5f96f h: refs/heads/master i: 214011: 807518b4806e707b07694490d450a957d055012d v: v3 --- [refs] | 2 +- trunk/net/wireless/nl80211.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index dc3906a5663c..63782192c60a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5daa8a8e691e28c6c725e7e91319b160b555c615 +refs/heads/master: afea0b7af7a0c070da8b2029d721abc930e5f96f diff --git a/trunk/net/wireless/nl80211.c b/trunk/net/wireless/nl80211.c index 37902a54e9c1..bb5b78eebeb2 100644 --- a/trunk/net/wireless/nl80211.c +++ b/trunk/net/wireless/nl80211.c @@ -3572,6 +3572,21 @@ static int nl80211_authenticate(struct sk_buff *skb, struct genl_info *info) if (err) goto unlock_rtnl; + if (key.idx >= 0) { + int i; + bool ok = false; + for (i = 0; i < rdev->wiphy.n_cipher_suites; i++) { + if (key.p.cipher == rdev->wiphy.cipher_suites[i]) { + ok = true; + break; + } + } + if (!ok) { + err = -EINVAL; + goto out; + } + } + if (!rdev->ops->auth) { err = -EOPNOTSUPP; goto out;