diff mbox

cfg80211: Ignore downstream DEAUTH for authtry_bsses

Message ID 20110609191327.20D2C2038D@glenhelen.mtv.corp.google.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Paul Stewart June 8, 2011, 12:52 p.m. UTC
If we receive a DEAUTH message from an AP while performing
an AUTH request, this does not constitute a reply to our AUTH
request.  In some cases an incoming DEAUTH may be due to the AP
clearing out old state from a previous authentication.
Instead we should ignore it and continue waiting for an AUTH
response.

Signed-off-by: Paul Stewart <pstew@chromium.org>
---
 net/wireless/mlme.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Comments

Johannes Berg June 9, 2011, 7:17 p.m. UTC | #1
On Wed, 2011-06-08 at 05:52 -0700, Paul Stewart wrote:
> If we receive a DEAUTH message from an AP while performing
> an AUTH request, this does not constitute a reply to our AUTH
> request.  In some cases an incoming DEAUTH may be due to the AP
> clearing out old state from a previous authentication.
> Instead we should ignore it and continue waiting for an AUTH
> response.

Ack, but you should do something about how you submit patches -- they
always end up at the bottom of my list because you're sending them with
the commit date as the email date.

johannes


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 493b939..3633ab6 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -170,7 +170,9 @@  void __cfg80211_send_deauth(struct net_device *dev,
 			break;
 		}
 		if (wdev->authtry_bsses[i] &&
-		    memcmp(wdev->authtry_bsses[i]->pub.bssid, bssid, ETH_ALEN) == 0) {
+		    memcmp(wdev->authtry_bsses[i]->pub.bssid, bssid,
+			   ETH_ALEN) == 0 &&
+		    memcmp(mgmt->sa, dev->dev_addr, ETH_ALEN) == 0) {
 			cfg80211_unhold_bss(wdev->authtry_bsses[i]);
 			cfg80211_put_bss(&wdev->authtry_bsses[i]->pub);
 			wdev->authtry_bsses[i] = NULL;