Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2417755pxu; Fri, 18 Dec 2020 12:46:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwbmrNtJeol2MO797c8ENoO9us0HNyE43irV3TZIgD3GTVsg3Zod7HTip8txtOa8ZLPqbq X-Received: by 2002:a50:f604:: with SMTP id c4mr6441871edn.307.1608324384724; Fri, 18 Dec 2020 12:46:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608324384; cv=none; d=google.com; s=arc-20160816; b=DC1K2nv+c6r2Q7krs2xEJyRll9i8PLs25IA6tmKYsidgiI1ZAefsqQfetOT/YC8wp6 gUA9aP5P567tjy1pCVTyVGeqS3vePLOf1m7wHSPFKyw+qd9IBHbOYsHGxDTX7xULFrhP 2UXIy+jNbU9kvFZm3QScG5H8tdEV6CoRSN1LXmCcKM8b/jQYzBTc6NrPVbLaSpnxsUdi Kf5Bb7lpYahKr7asRnQyj0ByF9pX3MTbP0ja92qrFAvwdVDiAqoKDcyJvKUsQlukDSuS ZpAK0tH/fo0M9NqNv6gcCFZkDMDu2hHzTDoKCU2Pf7jy8Gj2ua6G8B5GAlf2v8O8H/qZ WFpw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6CdUC09+dNRuA/9QkbmE00OV3i1rxpHmbq2OQcJtuaY=; b=phdMXB11TFwyO+ulK7Qt239b5fSv1KIMtm5JkWEkc1JYh/0Zu/Yr56idiS8WMV6EHS 2SSuhuSvpmV8UTLA2jcvuxIoFfUJqohfgs5x666KHtdldfi9JvzuWEOoBKm9s2Z8mdJN QZ0d+O8CWBaCC/JDry9vIVQFg1Pb9NHhUeksiofY/9RMWnk5H3M9w691gMcsBVRrThoB EMnp87XCkM2IaKMjx5R+C5HTp+xYVzPG8Xu5oBcjxi+7JpDvzOKrAQFqfDHSiwXE8ugY vt+/2RpgX53eozsT3ywcoc/21gySjhOAmFmrmc5RrDTRjxv+MvI8eG7li3NUhA07X5SJ HkCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=bTQto6Nt; 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 pw3si3511059ejb.186.2020.12.18.12.45.59; Fri, 18 Dec 2020 12:46:24 -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=bTQto6Nt; 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 S1726310AbgLRSsU (ORCPT + 99 others); Fri, 18 Dec 2020 13:48:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726798AbgLRSsT (ORCPT ); Fri, 18 Dec 2020 13:48:19 -0500 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A075AC061285 for ; Fri, 18 Dec 2020 10:47:23 -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:References:In-Reply-To: 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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=6CdUC09+dNRuA/9QkbmE00OV3i1rxpHmbq2OQcJtuaY=; b=bTQto6Nt/FYwKQeilrCtFYt1P7 oOknoadL7tMwmwS4k05hp5OrzXIfaL5kLzQCQ8/t9HBg3Y2aL2ER4mJWuYgooCXIbxzRI3lGm/ymN tfZci5E4//Uyi31l08EOLscGegjCL+Ixs/q8FGdgskfzEFBJsP1QLwIII8BF6n4VWnHY=; 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 1kqKmf-0000Fr-8L; Fri, 18 Dec 2020 19:47:21 +0100 From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: toke@redhat.com Subject: [PATCH v2 5/6] mac80211: fix fast-rx encryption check Date: Fri, 18 Dec 2020 19:47:17 +0100 Message-Id: <20201218184718.93650-5-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201218184718.93650-1-nbd@nbd.name> References: <20201218184718.93650-1-nbd@nbd.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org When using WEP, the default unicast key needs to be selected, instead of the STA PTK. Signed-off-by: Felix Fietkau --- net/mac80211/rx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 13b9bcc4865d..972895e9f22d 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -4176,6 +4176,8 @@ void ieee80211_check_fast_rx(struct sta_info *sta) rcu_read_lock(); key = rcu_dereference(sta->ptk[sta->ptk_idx]); + if (!key) + key = rcu_dereference(sdata->default_unicast_key); if (key) { switch (key->conf.cipher) { case WLAN_CIPHER_SUITE_TKIP: -- 2.28.0