android_kernel_samsung_sm86.../os_if/pkt_capture
Surabhi Vishnoi 4fa68113fe qcacld-3.0: Fix ethertype inspection logic of offload tx data pkt
Offload TX data packets such as ARP response, EAPOL during roaming are
sent by firmware through HTT msg if packet capture mode is enabled.
Whenever any such packet is received via HTT msg, host inspects the
ether type of the packet and matches with the TX filter set by user
via vendor command. If the ether type matches with the TX filter set
by user, then host forwards that packet to packet capture mode interface
otherwise, drops it.

To inspect the ether type of any packet, host uses generic API which
expects packet to be in SKB format. Currently, whenever any offload
TX data packet is received in HTT msg, host wrongly passes the buffer
received in HTT msg instead of SKB to APIs expecting SKB buffer.
This leads to undefined behavior.

So, to fix above issue, whenever any offload TX data packet received,
first allocate the SKB, copy the payload buf of HTT msg which is TX
packet to SKB data and then pass that SKB to the generic APIs to get
the ether type.
Additionally, this change fixes the minor logging error.

Change-Id: If09d49d8a1dcc04ca81454fc262bb5789a0f56be
CRs-Fixed: 3613594
2023-10-14 00:00:16 -07:00
..
inc qcacld-3.0: Fix os_if documentation 2022-11-26 15:51:20 -08:00
src qcacld-3.0: Fix ethertype inspection logic of offload tx data pkt 2023-10-14 00:00:16 -07:00