diff options
author | Johannes Berg <johannes.berg@intel.com> | 2019-05-28 10:56:03 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-06-14 14:12:01 +0200 |
commit | 901bb9891855164fdcfcfdd9c3d25bcc800d3f5b (patch) | |
tree | 74e0821a522ebb1f5bee4cb8df8705dd1a4442f3 /drivers/net/wireless/mac80211_hwsim.c | |
parent | mac80211: add ieee80211_get_he_iftype_cap() helper (diff) | |
download | linux-901bb9891855164fdcfcfdd9c3d25bcc800d3f5b.tar.xz linux-901bb9891855164fdcfcfdd9c3d25bcc800d3f5b.zip |
nl80211: require and validate vendor command policy
Require that each vendor command give a policy of its sub-attributes
in NL80211_ATTR_VENDOR_DATA, and then (stricly) check the contents,
including the NLA_F_NESTED flag that we couldn't check on the outer
layer because there we don't know yet.
It is possible to use VENDOR_CMD_RAW_DATA for raw data, but then no
nested data can be given (NLA_F_NESTED flag must be clear) and the
data is just passed as is to the command.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 60ca13e0f15b..b88768c661e2 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -457,6 +457,8 @@ static struct wiphy_vendor_command mac80211_hwsim_vendor_commands[] = { .subcmd = QCA_NL80211_SUBCMD_TEST }, .flags = WIPHY_VENDOR_CMD_NEED_NETDEV, .doit = mac80211_hwsim_vendor_cmd_test, + .policy = hwsim_vendor_test_policy, + .maxattr = QCA_WLAN_VENDOR_ATTR_MAX, } }; |