summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnson <jjohnson@codeaurora.org>2018-05-06 13:41:23 -0700
committernshrivas <nshrivas@codeaurora.org>2018-05-07 20:24:55 -0700
commit95efcb04f0dce1725e785dbc14b680572dce4cbf (patch)
tree41317654bdcc914fcdc1bc86d3f4c81faf660979
parentb31e63e4bcc258ce4f2a7825ef491c6076127869 (diff)
qcacld-3.0: Fix NDP Response Code policy
The qca_wlan_vendor_ndp_policy for the attribute QCA_WLAN_VENDOR_ATTR_NDP_RESPONSE_CODE currently specifies type NLA_U16. However this attribute is defined to be an unsigned 32 bit value, and nla_get_u32() is used to read the value, so change the policy to use type NLA_U32 so that nla_parse() can properly verify that the TLV payload has (at least) 4 bytes of data. Change-Id: I915a94e7449c2bc1abde64e2a7f5df6a58488ed6 CRs-Fixed: 2236892
-rw-r--r--core/hdd/src/wlan_hdd_nan_datapath.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_nan_datapath.c b/core/hdd/src/wlan_hdd_nan_datapath.c
index 4efb285e3daa..2bf01f19d61a 100644
--- a/core/hdd/src/wlan_hdd_nan_datapath.c
+++ b/core/hdd/src/wlan_hdd_nan_datapath.c
@@ -51,7 +51,7 @@ qca_wlan_vendor_ndp_policy[QCA_WLAN_VENDOR_ATTR_NDP_PARAMS_MAX + 1] = {
[QCA_WLAN_VENDOR_ATTR_NDP_APP_INFO] = { .type = NLA_BINARY,
.len = NDP_APP_INFO_LEN },
[QCA_WLAN_VENDOR_ATTR_NDP_INSTANCE_ID] = { .type = NLA_U32 },
- [QCA_WLAN_VENDOR_ATTR_NDP_RESPONSE_CODE] = { .type = NLA_U16 },
+ [QCA_WLAN_VENDOR_ATTR_NDP_RESPONSE_CODE] = { .type = NLA_U32 },
[QCA_WLAN_VENDOR_ATTR_NDP_NDI_MAC_ADDR] = { .type = NLA_BINARY,
.len = QDF_MAC_ADDR_SIZE },
[QCA_WLAN_VENDOR_ATTR_NDP_INSTANCE_ID_ARRAY] = { .type = NLA_BINARY,