From patchwork Tue Mar 3 05:10:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 11417185 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9DB6992A for ; Tue, 3 Mar 2020 05:11:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7CF8F20CC7 for ; Tue, 3 Mar 2020 05:11:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583212273; bh=Acem9Yk+8J44gj1pR+rzc2aijA4WBRsn1xT2ymQr8cM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=e/YTqGEMqpEwhk+XkamTQENgftZh/9mAzPX+qWuMtFCfN2JHU1K1RihIoFXOv+pRV ZfwVslO9WdNmUy7udL24H2BeclAujexABineqZy5ONp+LBH2rOEiU3ax7o9xazQhaH C3+B1uj5yeKrtlKtTJZPAXTAp3VFzO3MR2gYlN48= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727446AbgCCFLL (ORCPT ); Tue, 3 Mar 2020 00:11:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:43462 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725807AbgCCFLJ (ORCPT ); Tue, 3 Mar 2020 00:11:09 -0500 Received: from kicinski-fedora-PC1C0HJN.thefacebook.com (unknown [163.114.132.128]) (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 BE013215A4; Tue, 3 Mar 2020 05:11:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583212269; bh=Acem9Yk+8J44gj1pR+rzc2aijA4WBRsn1xT2ymQr8cM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RSLVAND9qeTgDW85OERPRM+/L0Cq3cuaeWRnZlf1Bv+X1SRYlBNJ9QFNR04vJlOYc xA7A4fSdL2jSsHDWubyt8gCJySRqVYU6rEoMyzX7V8O4G6V5lcsUO/E9xgV7fxPSX4 nWV5SEPFdJiSPa0WvYP4cE5kpIYujU7Rn0qyinGI= From: Jakub Kicinski To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, kvalo@codeaurora.org, Jakub Kicinski , David Spinadel , Luca Coelho , Avraham Stern , Assaf Krauss Subject: [PATCH wireless 2/3] nl80211: add missing attribute validation for beacon report scanning Date: Mon, 2 Mar 2020 21:10:57 -0800 Message-Id: <20200303051058.4089398-3-kuba@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200303051058.4089398-1-kuba@kernel.org> References: <20200303051058.4089398-1-kuba@kernel.org> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Add missing attribute validation for beacon report scanning to the netlink policy. Fixes: 1d76250bd34a ("nl80211: support beacon report scanning") Signed-off-by: Jakub Kicinski --- CC: David Spinadel CC: Luca Coelho CC: Avraham Stern CC: Assaf Krauss --- net/wireless/nl80211.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index cd0e024d7cb6..48e6508aba52 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -470,6 +470,8 @@ const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { [NL80211_ATTR_WOWLAN_TRIGGERS] = { .type = NLA_NESTED }, [NL80211_ATTR_STA_PLINK_STATE] = NLA_POLICY_MAX(NLA_U8, NUM_NL80211_PLINK_STATES - 1), + [NL80211_ATTR_MEASUREMENT_DURATION] = { .type = NLA_U16 }, + [NL80211_ATTR_MEASUREMENT_DURATION_MANDATORY] = { .type = NLA_FLAG }, [NL80211_ATTR_MESH_PEER_AID] = NLA_POLICY_RANGE(NLA_U16, 1, IEEE80211_MAX_AID), [NL80211_ATTR_SCHED_SCAN_INTERVAL] = { .type = NLA_U32 },