qcacmn: 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: 2237658
This commit is contained in:
@@ -59,7 +59,7 @@ vendor_attr_policy[QCA_WLAN_VENDOR_ATTR_NDP_PARAMS_MAX + 1] = {
|
||||
.len = sizeof(uint32_t)
|
||||
},
|
||||
[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] = {
|
||||
|
Reference in New Issue
Block a user