2011-06-09 19:13:32

by Paul Stewart

[permalink] [raw]
Subject: [PATCH] cfg80211: Ignore downstream DEAUTH for authtry_bsses

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 <[email protected]>
---
net/wireless/mlme.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

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;
--
1.7.3.1



2011-06-09 19:17:20

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] cfg80211: Ignore downstream DEAUTH for authtry_bsses

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