From patchwork Wed Jun 8 12:52:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Stewart X-Patchwork-Id: 866492 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p59JDYDb004167 for ; Thu, 9 Jun 2011 19:13:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751481Ab1FITNc (ORCPT ); Thu, 9 Jun 2011 15:13:32 -0400 Received: from smtp-out.google.com ([74.125.121.67]:45522 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751437Ab1FITNc (ORCPT ); Thu, 9 Jun 2011 15:13:32 -0400 Received: from kpbe20.cbf.corp.google.com (kpbe20.cbf.corp.google.com [172.25.105.84]) by smtp-out.google.com with ESMTP id p59JDSJQ007650; Thu, 9 Jun 2011 12:13:29 -0700 Received: from glenhelen.mtv.corp.google.com (glenhelen.mtv.corp.google.com [172.22.72.223]) by kpbe20.cbf.corp.google.com with ESMTP id p59JDR0p025481; Thu, 9 Jun 2011 12:13:27 -0700 Received: by glenhelen.mtv.corp.google.com (Postfix, from userid 110058) id 20D2C2038D; Thu, 9 Jun 2011 12:13:27 -0700 (PDT) From: Paul Stewart Date: Wed, 8 Jun 2011 05:52:52 -0700 Subject: [PATCH] cfg80211: Ignore downstream DEAUTH for authtry_bsses To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net Message-Id: <20110609191327.20D2C2038D@glenhelen.mtv.corp.google.com> X-System-Of-Record: true Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 09 Jun 2011 19:13:35 +0000 (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 --- 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;