Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1653622ybb; Thu, 26 Mar 2020 05:01:27 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtjACVmX/pvQNoL53VUEPQk1xFB5qnjUqBDZxoyNBIyGCWu2oHnNRhDUy+RgdcC+5XZwL+n X-Received: by 2002:aca:bc86:: with SMTP id m128mr1508576oif.11.1585224087563; Thu, 26 Mar 2020 05:01:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585224087; cv=none; d=google.com; s=arc-20160816; b=l1zru4hVfiRpmAGodM4GnXmNVbo6xFQEK6aoi/opFkhOd9X1OZ0C7z/f2Gs3KNm9gI HMYpitUGt9GLBgI/dbRN6VCrJ1CepAsVNjiYkL/W+YW+FZa+Gak2ihbiGHh0zRNXAzox azKJYejdTfjyz/URMo2TB7Jvo099eqQE/PbsbeHFy+zL5s6ETxIIRomDmCv06GcZx3ey c3B9T3huO/7FXhKThm2C1Vle3SkZirhKQlFzAxVZWQBdm6Rj0WTsQ9V5OJatHzq1Qs6T JhsFJZdCWL62AeWsZ9uQqslHtGjhlSKbriSdDbKvra8kMO69VbPwtp3SNjQLSTsvoSiR E3dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:cc:to:from; bh=r5P8AZQ/NN/wVcHkgQIKZbiK2l4kJO8B5DP5I/bfDp4=; b=W+40hzp0w6ngTVUFoC1Ry3yOskm2HaNHrpJgsPLBncLeujUHy1g40Gw1+Dhhjoc7XK VbmqaKXyROEDmhQ2KH3zwP/h5r/6D0Yt0+gh+RiqkSNDcaoINo62RfUgzfa4LFMWr3FR +g8uvsxygX6G196uk2t1hLJ6/Jy2bCjkJsn3VBhQuFdxIt633P2DePF9fEZgHU/rJtH+ bRDoKuKgi5UI+cxlXEBnsDAbtEH0Jo0hha/Ieoumc2QiNqBMeiY3m9ZpLV13CEVL91WZ wj+C2svTY2pVDy+KWEmghuhPrrRoXczvc6IE3pWCxEy5uwI5sh8EaIc+6fncU1FlcIaW 04/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t2si898581oih.136.2020.03.26.05.01.04; Thu, 26 Mar 2020 05:01:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728144AbgCZMBB (ORCPT + 99 others); Thu, 26 Mar 2020 08:01:01 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:44098 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727991AbgCZMBA (ORCPT ); Thu, 26 Mar 2020 08:01:00 -0400 Received: from 91-156-6-193.elisa-laajakaista.fi ([91.156.6.193] helo=redipa.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jHRBz-0003we-0t; Thu, 26 Mar 2020 14:00:59 +0200 From: Luca Coelho To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Date: Thu, 26 Mar 2020 14:00:33 +0200 Message-Id: <20200326120042.578777-4-luca@coelho.fi> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200326120042.578777-1-luca@coelho.fi> References: <20200326120042.578777-1-luca@coelho.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on farmhouse.coelho.fi X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, TVD_RCVD_IP autolearn=ham autolearn_force=no version=3.4.4 Subject: [PATCH 03/12] mac80211: Don't destroy auth data in case of anti-clogging Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Andrei Otcheretianski SAE AP may reject authentication with WLAN_STATUS_ANTI_CLOG_REQUIRED. As the user space will immediately continue the authentication flow, there is no need to destroy the authentication data in this case. This saves unneeded station removal and releasing the channel. Change-Id: I8040a842874aaf6d209df3fc8a2acb97a0bf508b Signed-off-by: Andrei Otcheretianski Signed-off-by: Luca Coelho --- net/mac80211/mlme.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index f1f518790c12..a0de21a51f65 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2948,10 +2948,15 @@ static void ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata, } if (status_code != WLAN_STATUS_SUCCESS) { + cfg80211_rx_mlme_mgmt(sdata->dev, (u8 *)mgmt, len); + + if (auth_alg == WLAN_AUTH_SAE && + status_code == WLAN_STATUS_ANTI_CLOG_REQUIRED) + return; + sdata_info(sdata, "%pM denied authentication (status %d)\n", mgmt->sa, status_code); ieee80211_destroy_auth_data(sdata, false); - cfg80211_rx_mlme_mgmt(sdata->dev, (u8 *)mgmt, len); event.u.mlme.status = MLME_DENIED; event.u.mlme.reason = status_code; drv_event_callback(sdata->local, sdata, &event); -- 2.25.1