nl80211: add strict start type
authorJohannes Berg <johannes.berg@intel.com>
Wed, 31 Jul 2019 08:58:20 +0000 (10:58 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 31 Jul 2019 09:00:52 +0000 (11:00 +0200)
Add a strict start type so all new attributes starting from
NL80211_ATTR_HE_OBSS_PD are validated strictly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c

index 3006cfc..1a107f2 100644 (file)
@@ -290,6 +290,7 @@ he_obss_pd_policy[NL80211_HE_OBSS_PD_ATTR_MAX + 1] = {
 };
 
 const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
+       [0] = { .strict_start_type = NL80211_ATTR_HE_OBSS_PD },
        [NL80211_ATTR_WIPHY] = { .type = NLA_U32 },
        [NL80211_ATTR_WIPHY_NAME] = { .type = NLA_NUL_STRING,
                                      .len = 20-1 },