Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2420103pxu; Fri, 18 Dec 2020 12:50:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJx//Bwi6nw8fAorqlWvpMINDaOqpP5XWjSR1i0/QMYt6R7ITMbaP59VRILFvKnO0r2z/Ohs X-Received: by 2002:a17:906:9382:: with SMTP id l2mr6008066ejx.162.1608324638699; Fri, 18 Dec 2020 12:50:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608324638; cv=none; d=google.com; s=arc-20160816; b=t4I2UddhZcpJ0xEZqLZN6iWWsAhT3KQFg/iuAYgd/MbsJo3PVBama6hjZWTEt1+dzW Ae9OHE3AYyNuxTqtqUE+OuME55lv1b8DsxZovGX4lloWV8Z4duzEL25kyWcZwXyG2Aes WPtvouBNKIwhgQ4MgCPmWOGbipnXnW7Bu0dLU0dVdf+vmLhbJoJ3gWqhbgKuH8P075lt 1RdVXZxyW7Q1lazGntDPSTcxT/AgX1F9p5uiuWZryh8F4cu1dg/MdEBMbHxDG4G2P/Ia tZIjpGcK26oeogGLiwHg8f0R2vxHDs24oiAjwFuR3vqSovtmFMtVwuEt/M782ddjQA/Z mLLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=pj9T7trL50a6AAE0LhTdxMlG+yYf9rsZC2Ilf+8naiw=; b=CjvtGpobrKdssQyTt35CSTOdJgM7EqIVDi4rSWrkiXXuOW9Z8g6eqITLw6oSVhgppP fe4WemtBCtY/s4+/nfPEjKkOnEEkqKd8z4ox2EyLBD8JOSZLBcYk8eHSNO1+yBEkMfDW ESQFKfca4eucJengkaHTUE3VXJCLl5LNuOxIuO/TYqJOyJ9hycBb7YWXh3riy786WoPm 2WDS99m8+si2BYuP7rTNJclkM0Zifnh9nqQCFJCV+H5MG38tSbD3IbysnhTw4w/f+1Mb 671tuoVdW2satwM4BZlXRjPW4R7Sh8u7iL8Cl2yMM9ISEc+q2q3Y9Rj0CU+4eJ6C+huc YnDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=unJtlQlM; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j1si7175609edn.611.2020.12.18.12.50.16; Fri, 18 Dec 2020 12:50:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=unJtlQlM; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728026AbgLRTQY (ORCPT + 99 others); Fri, 18 Dec 2020 14:16:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727826AbgLRTQY (ORCPT ); Fri, 18 Dec 2020 14:16:24 -0500 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDD6EC0617A7 for ; Fri, 18 Dec 2020 11:15:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject :Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=pj9T7trL50a6AAE0LhTdxMlG+yYf9rsZC2Ilf+8naiw=; b=unJtlQlMkOEGJeBVsD1/FAP4Zu fiBDm1nh2zGSfzb96QV5GEUZCPvjvpe1LzLIqOokSDPSq36QLpv4mRSvO1pQE/4iHqujVBsaQS0Oq DWfQfX9zhkqne/pG+O63CfbPdzNyUGDML++3KjE90c+jeo79D/KIwAznU0g+lBMagsG8=; Received: from p4ff13815.dip0.t-ipconnect.de ([79.241.56.21] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.89) (envelope-from ) id 1kqLDq-0001pC-Js; Fri, 18 Dec 2020 20:15:26 +0100 From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, Sebastian Gottschall Subject: [PATCH] mac80211: do not drop tx nulldata packets on encrypted links Date: Fri, 18 Dec 2020 20:15:25 +0100 Message-Id: <20201218191525.1168-1-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org ieee80211_tx_h_select_key drops any non-mgmt packets without a key when encryption is used. This is wrong for nulldata packets that can't be encrypted and are sent out for probing clients and indicating 4-address mode. Reported-by: Sebastian Gottschall Fixes: a0761a301746 ("mac80211: drop data frames without key on encrypted links") Signed-off-by: Felix Fietkau --- net/mac80211/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 39c7059c644f..b728a9507a87 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -649,7 +649,7 @@ ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx) if (!skip_hw && tx->key && tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) info->control.hw_key = &tx->key->conf; - } else if (!ieee80211_is_mgmt(hdr->frame_control) && tx->sta && + } else if (ieee80211_is_data_present(hdr->frame_control) && tx->sta && test_sta_flag(tx->sta, WLAN_STA_USES_ENCRYPTION)) { return TX_DROP; } -- 2.28.0