diff options
| author | Jeff Johnson <jjohnson@codeaurora.org> | 2018-05-06 12:48:01 -0700 |
|---|---|---|
| committer | nshrivas <nshrivas@codeaurora.org> | 2018-05-07 20:24:51 -0700 |
| commit | b31e63e4bcc258ce4f2a7825ef491c6076127869 (patch) | |
| tree | 3a6da8ca249ea3f988b95cfc4a392ec72f1bb8ec | |
| parent | d05435169c6feaa6c141bf93975c192d0b8be2ba (diff) | |
qcacld-3.0: Fix NDP Discovery MAC address policy
The current qca_wlan_vendor_ndp_policy for attribute
QCA_WLAN_VENDOR_ATTR_NDP_PEER_DISCOVERY_MAC_ADDR uses type NLA_BINARY.
Unfortunately this type uses the len as a maximum length and not a
minimum length which means that nla_parse() cannot guarantee that 6
bytes of MAC address are present. Change the policy to use type
NLA_UNSPEC so that nla_parse() will ensure that the NDP Discovery MAC
address TLV contains (at least) 6 bytes.
Change-Id: I2c7e1efdb413dbd2f79c36ed1626c006b86e8b5b
CRs-Fixed: 2236889
| -rw-r--r-- | core/hdd/src/wlan_hdd_nan_datapath.c | 2 |
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 0b6dd22845ee..4efb285e3daa 100644 --- a/core/hdd/src/wlan_hdd_nan_datapath.c +++ b/core/hdd/src/wlan_hdd_nan_datapath.c @@ -43,7 +43,7 @@ qca_wlan_vendor_ndp_policy[QCA_WLAN_VENDOR_ATTR_NDP_PARAMS_MAX + 1] = { [QCA_WLAN_VENDOR_ATTR_NDP_SERVICE_INSTANCE_ID] = { .type = NLA_U32 }, [QCA_WLAN_VENDOR_ATTR_NDP_CHANNEL] = { .type = NLA_U32 }, [QCA_WLAN_VENDOR_ATTR_NDP_PEER_DISCOVERY_MAC_ADDR] = { - .type = NLA_BINARY, + .type = NLA_UNSPEC, .len = QDF_MAC_ADDR_SIZE }, [QCA_WLAN_VENDOR_ATTR_NDP_CONFIG_SECURITY] = { .type = NLA_U16 }, [QCA_WLAN_VENDOR_ATTR_NDP_CONFIG_QOS] = { .type = NLA_BINARY, |
