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:

committed by
Madan Koyyalamudi

parent
6a194730ae
commit
4d03fcbd12
@@ -70,6 +70,7 @@ typedef struct sk_buff_head __qdf_nbuf_queue_head_t;
|
|||||||
#define QDF_NBUF_CB_PACKET_TYPE_DHCP 4
|
#define QDF_NBUF_CB_PACKET_TYPE_DHCP 4
|
||||||
#define QDF_NBUF_CB_PACKET_TYPE_ICMP 5
|
#define QDF_NBUF_CB_PACKET_TYPE_ICMP 5
|
||||||
#define QDF_NBUF_CB_PACKET_TYPE_ICMPv6 6
|
#define QDF_NBUF_CB_PACKET_TYPE_ICMPv6 6
|
||||||
|
#define QDF_NBUF_CB_PACKET_TYPE_DHCPV6 7
|
||||||
|
|
||||||
#define RADIOTAP_BASE_HEADER_LEN sizeof(struct ieee80211_radiotap_header)
|
#define RADIOTAP_BASE_HEADER_LEN sizeof(struct ieee80211_radiotap_header)
|
||||||
|
|
||||||
|
@@ -2188,6 +2188,9 @@ bool __qdf_nbuf_data_is_ipv6_dhcp_pkt(uint8_t *data)
|
|||||||
uint16_t dport;
|
uint16_t dport;
|
||||||
uint8_t ipv6_offset;
|
uint8_t ipv6_offset;
|
||||||
|
|
||||||
|
if (!__qdf_nbuf_data_is_ipv6_pkt(data))
|
||||||
|
return false;
|
||||||
|
|
||||||
ipv6_offset = __qdf_nbuf_get_ip_offset(data);
|
ipv6_offset = __qdf_nbuf_get_ip_offset(data);
|
||||||
sport = *(uint16_t *)(data + ipv6_offset +
|
sport = *(uint16_t *)(data + ipv6_offset +
|
||||||
QDF_NBUF_TRAC_IPV6_HEADER_SIZE);
|
QDF_NBUF_TRAC_IPV6_HEADER_SIZE);
|
||||||
|
Reference in New Issue
Block a user