From patchwork Sat Apr 11 10:25:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Theil X-Patchwork-Id: 1269301 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=tu-ilmenau.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20170209 header.b=KIMN5nMG; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48zrdq0gQpz9sSt for ; Sat, 11 Apr 2020 20:26:39 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LQ+clUNzlISRLP8OcO6WJarwbNjWqeNiUVnjgjabDOw=; b=KIMN5nMGuD2yAq LmFhxlPTRHGWYhz//ixChay+t2hAUzlzf7/D3prC9U1D43lwTBnMKMMu7iQWfGHEY+sQoqpJhDhCB geQ819yqGMhgumBxipi+EoTZZac+2rcMEBXzOVtKEnYZnZV5ss2zxmpZzLnZBNhafAJqr2j+E+/bK ujy1oqHy34yEah3fdRiVjKmS4PHBWNyEpgGuDfAZF9Sx2j5kfYbLcgTCVo4h2CqVXlV5Fk+gANrXG aFx9Tu1sQbnEUK1KUThAxqPx3E38/w9xU5HiCvAzoypOqOiEfCnNOgzGcKc82vijxbfEwibyptmHE nFqMCauNzaMb6nW9Qs0w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jNDLH-00037N-13; Sat, 11 Apr 2020 10:26:27 +0000 Received: from smail.rz.tu-ilmenau.de ([141.24.186.67]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jNDKZ-0002QI-US for hostap@lists.infradead.org; Sat, 11 Apr 2020 10:25:45 +0000 Received: from isengard.fritz.box (unknown [87.147.56.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smail.rz.tu-ilmenau.de (Postfix) with ESMTPSA id 3F3E8580075; Sat, 11 Apr 2020 12:25:32 +0200 (CEST) From: Markus Theil To: hostap@lists.infradead.org Subject: [PATCH v2 01/11] nl80211: also check for no preauth feature Date: Sat, 11 Apr 2020 12:25:17 +0200 Message-Id: <20200411102527.154154-2-markus.theil@tu-ilmenau.de> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200411102527.154154-1-markus.theil@tu-ilmenau.de> References: <20200411102527.154154-1-markus.theil@tu-ilmenau.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200411_032544_143482_CF71BF0F X-CRM114-Status: GOOD ( 11.29 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [141.24.186.67 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Theil Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Before Linux 5.7 all pre-auth frames are forwared over the nl80211 ctrl port, if it is registered. hostap and wpa_supplicant currently do not assume this behavior, as pre-auth frames should be handled as ordinary data frames in the kernel. Checking against the NL80211_EXT_FEATURE_CONTROL_PORT_NO_PREAUTH feature flag allows us to disable this behavior later on ctrl port registration. No new capa->flags value is introduced, instead WPA_DRIVER_FLAGS_CONTROL_PORT is only set now, if this feature is present. Without this feature, only control port tx is possible without breaking pre-auth features. Signed-off-by: Markus Theil --- src/drivers/driver_nl80211_capa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c index b4fed9ea8..cd0ecf75d 100644 --- a/src/drivers/driver_nl80211_capa.c +++ b/src/drivers/driver_nl80211_capa.c @@ -439,7 +439,9 @@ static void wiphy_info_ext_feature_flags(struct wiphy_info_data *info, capa->flags |= WPA_DRIVER_FLAGS_FTM_RESPONDER; if (ext_feature_isset(ext_features, len, - NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211)) + NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211) && + ext_feature_isset(ext_features, len, + NL80211_EXT_FEATURE_CONTROL_PORT_NO_PREAUTH)) capa->flags |= WPA_DRIVER_FLAGS_CONTROL_PORT; if (ext_feature_isset(ext_features, len,