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: 861422 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p58I6rwD010696 for ; Wed, 8 Jun 2011 18:07:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754773Ab1FHNOj (ORCPT ); Wed, 8 Jun 2011 09:14:39 -0400 Received: from smtp-out.google.com ([74.125.121.67]:26677 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753334Ab1FHNOi (ORCPT ); Wed, 8 Jun 2011 09:14:38 -0400 Received: from kpbe11.cbf.corp.google.com (kpbe11.cbf.corp.google.com [172.25.105.75]) by smtp-out.google.com with ESMTP id p58DEZbZ031446; Wed, 8 Jun 2011 06:14:35 -0700 Received: from glenhelen.mtv.corp.google.com (glenhelen.mtv.corp.google.com [172.22.72.223]) by kpbe11.cbf.corp.google.com with ESMTP id p58DEYnY020828; Wed, 8 Jun 2011 06:14:34 -0700 Received: by glenhelen.mtv.corp.google.com (Postfix, from userid 110058) id DC6B62034B; Wed, 8 Jun 2011 06:14:33 -0700 (PDT) From: Paul Stewart Date: Wed, 8 Jun 2011 05:52:52 -0700 In-Reply-To: <1307533801.3961.14.camel@jlt3.sipsolutions.net> References: <1307530922.3961.4.camel@jlt3.sipsolutions.net> <1307533479.3961.13.camel@jlt3.sipsolutions.net> <1307533801.3961.14.camel@jlt3.sipsolutions.net> Subject: [PATCH] cfg80211: Ignore downstream DEAUTH for authtry_bsses To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net Message-Id: <20110608131433.DC6B62034B@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 (demeter2.kernel.org [140.211.167.43]); Wed, 08 Jun 2011 18:07:13 +0000 (UTC) Downsteram DEAUTH messages do not refer to a current authentication attempt -- AUTH responses do. Therefore we should not allow DEAUTH from an AP to void state for an AUTH attempt in progress. 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;