Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1023561ybe; Wed, 4 Sep 2019 11:17:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqynkTCZ4qTrf3ZYFXYrRfiEFsifPSHCbstOGPqXutYNmlbd0eWwiLjt7sO2pdl/+z9W/pEr X-Received: by 2002:a17:902:690b:: with SMTP id j11mr43336380plk.35.1567621076931; Wed, 04 Sep 2019 11:17:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567621076; cv=none; d=google.com; s=arc-20160816; b=qAAwtvTVW5VxbcVVFQaSg95S4D+E/qUURc3wD0ABKcg8g1n/U2KO459BaJXK0Qma5j YOpVIv1Faxz7pPk26j9ZOMFcgYXF89tV124lLD8MKwh6WTOoAZFHCaeNpx5qbkXKqtef bbgGyvwbO5y+qapNhVn+0jcBh0TfWIdGf6O4le8EZTmq44VhCQSewWS2ktgmvA74g/5B kxtaED43Np5h3xfkAYDh2TYU5zFpmb1iCvN/u7/9EAmzi72bIFQ1z+OKcuBulwJP/zZx M6XITojy1RpGZ8hrZvSUO3lOXNjBMfjA2FPVTz39r9uLTWvkLa8nodxTQT3Tducu0Y4T LqcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ojwIc2OrtUv1rSgrhQUpFSvilJ83uN10ac/o5dKcvL4=; b=Wp8YLdtEOLwr92szw0irT1snbZy7UwLCPNIs1MSfbRAN4jad9bFoQ+NE9bzIrseRxz 0yV0cytgPfaDGDscAIH6+er496+fc8WTwxU0wOtAuUeBLALeSn9AUFbiQkWwgaj1TJSq SgjHCymlc/ky6RyRg13g3n7TaWtZV/ERG/h9kiibwdzppTAerOWOZMpYm6f6KlDAYgk1 M/sf76zQ55gw+BrOCrgKjRxiPjxqbrI92qQcAFIkTEzA+bB8+XDAOhrvF42TeCdoKxnS CkPp5IjAs6MJ6coQ79VYl7ovaUs+82hpMhPYeqeEJTKG/3jT8Jbw+Bd+0Mvnse7J2fnp ueKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eAMZbza8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 y12si22294835pfo.30.2019.09.04.11.17.41; Wed, 04 Sep 2019 11:17:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eAMZbza8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390838AbfIDSOj (ORCPT + 99 others); Wed, 4 Sep 2019 14:14:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:59926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390828AbfIDSOg (ORCPT ); Wed, 4 Sep 2019 14:14:36 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 882402087E; Wed, 4 Sep 2019 18:14:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567620875; bh=RO75rEGuI0EXfpa+RFUYzyyXCpPFC+MVgXKPVup4TEQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eAMZbza8MG1zMVLOrbG6W9XTqFJLzo9EspgLPHr2yQFWDO+NxCK9R9An4PWT6JGEC yiToUBmsDcmT8KnSGQxA0fU6Rzsph4D/SNDZ6ilbFAs6P++Xgq9oV9auOATDSiBg4b LGMfV8t912aBrK47ykpeX7hpBRqByJ10HoIy0Sw4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Denis Kenzior , Johannes Berg Subject: [PATCH 5.2 128/143] mac80211: Correctly set noencrypt for PAE frames Date: Wed, 4 Sep 2019 19:54:31 +0200 Message-Id: <20190904175319.414317377@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904175314.206239922@linuxfoundation.org> References: <20190904175314.206239922@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Denis Kenzior commit f8b43c5cf4b62a19f2210a0f5367b84e1eff1ab9 upstream. The noencrypt flag was intended to be set if the "frame was received unencrypted" according to include/uapi/linux/nl80211.h. However, the current behavior is opposite of this. Cc: stable@vger.kernel.org Fixes: 018f6fbf540d ("mac80211: Send control port frames over nl80211") Signed-off-by: Denis Kenzior Link: https://lore.kernel.org/r/20190827224120.14545-3-denkenz@gmail.com Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- net/mac80211/rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -2447,7 +2447,7 @@ static void ieee80211_deliver_skb_to_loc skb->protocol == cpu_to_be16(ETH_P_PREAUTH)) && sdata->control_port_over_nl80211)) { struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); - bool noencrypt = status->flag & RX_FLAG_DECRYPTED; + bool noencrypt = !(status->flag & RX_FLAG_DECRYPTED); cfg80211_rx_control_port(dev, skb, noencrypt); dev_kfree_skb(skb);