qcacmn: Check for IPV6 before checking DHCPv6

Currently we are not checking whether the packet is a IPV6 packet when
checking for a DHCPv6 packet. This can be error prone if done for a IPV4
packet.
Check for IPv6 before checking for DHCPv6.
Add QDF_NBUF_CB_PACKET_TYPE_DHCPV6 packet type in qdf_nbuf_cb.

Change-Id: Ic24dbaad8bd910c85bb1086317c12ad46466a128
CRs-Fixed: 3114311
This commit is contained in:
Mohit Khanna
2022-01-20 05:21:40 -08:00
committed by Madan Koyyalamudi
parent 6a194730ae
commit 4d03fcbd12
2 changed files with 4 additions and 0 deletions

View File

@@ -2188,6 +2188,9 @@ bool __qdf_nbuf_data_is_ipv6_dhcp_pkt(uint8_t *data)
uint16_t dport;
uint8_t ipv6_offset;
if (!__qdf_nbuf_data_is_ipv6_pkt(data))
return false;
ipv6_offset = __qdf_nbuf_get_ip_offset(data);
sport = *(uint16_t *)(data + ipv6_offset +
QDF_NBUF_TRAC_IPV6_HEADER_SIZE);