All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	kvalo@codeaurora.org, Jakub Kicinski <kuba@kernel.org>,
	"Franky (Zhenhui) Lin" <frankyl@broadcom.com>,
	Arend van Spriel <arend@broadcom.com>,
	Pieter-Paul Giesberts <pieterpg@broadcom.com>
Subject: [PATCH wireless 1/3] nl80211: add missing attribute validation for critical protocol indication
Date: Mon,  2 Mar 2020 21:10:56 -0800	[thread overview]
Message-ID: <20200303051058.4089398-2-kuba@kernel.org> (raw)
In-Reply-To: <20200303051058.4089398-1-kuba@kernel.org>

Add missing attribute validation for critical protocol fields
to the netlink policy.

Fixes: 5de17984898c ("cfg80211: introduce critical protocol indication from user-space")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: "Franky (Zhenhui) Lin" <frankyl@broadcom.com>
CC: Arend van Spriel <arend@broadcom.com>
CC: Pieter-Paul Giesberts <pieterpg@broadcom.com>

Leaving the conversion to RANGE to a follow up,
as this may get stabled.
---
 net/wireless/nl80211.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 5b19e9fac4aa..cd0e024d7cb6 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -531,6 +531,8 @@ const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
 	[NL80211_ATTR_MDID] = { .type = NLA_U16 },
 	[NL80211_ATTR_IE_RIC] = { .type = NLA_BINARY,
 				  .len = IEEE80211_MAX_DATA_LEN },
+	[NL80211_ATTR_CRIT_PROT_ID] = { .type = NLA_U16 },
+	[NL80211_ATTR_MAX_CRIT_PROT_DURATION] = { .type = NLA_U16 },
 	[NL80211_ATTR_PEER_AID] =
 		NLA_POLICY_RANGE(NLA_U16, 1, IEEE80211_MAX_AID),
 	[NL80211_ATTR_CH_SWITCH_COUNT] = { .type = NLA_U32 },
-- 
2.24.1


  reply	other threads:[~2020-03-03  5:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03  5:10 [PATCH wireless 0/3] nl80211: add missing attribute validation Jakub Kicinski
2020-03-03  5:10 ` Jakub Kicinski [this message]
2020-03-03  5:10 ` [PATCH wireless 2/3] nl80211: add missing attribute validation for beacon report scanning Jakub Kicinski
2020-03-03  5:10 ` [PATCH wireless 3/3] nl80211: add missing attribute validation for channel switch Jakub Kicinski
2020-03-03  7:29 ` [PATCH wireless 0/3] nl80211: add missing attribute validation Johannes Berg
2020-03-03 17:53   ` Jakub Kicinski
2020-03-03 18:58     ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200303051058.4089398-2-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=arend@broadcom.com \
    --cc=frankyl@broadcom.com \
    --cc=johannes@sipsolutions.net \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pieterpg@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.