Skip to content
Commit 8069d47c authored by Krishna T's avatar Krishna T Committed by Carles Cufí
Browse files

net: pkt: Allow zero payload for non-IPv4/v6 frames



For socket families that are niether INET/INET6 e.g., PACKET, we cannot
estimate header length, so, if the payload is zero as well, networking
stack drop the packet.

Instead, allow for zero header + payload packets and let L2 take care of
handling them, for some L2's this is still a valid frame.

E..g, In case of Wi-Fi this is sent as 802.11 Header + LLC Header
(no payload).

Add unittests for both AF_INET + Zero payload and AF_PACKET + Zero
payload.

Signed-off-by: default avatarKrishna T <krishna.t@nordicsemi.no>
parent 1bed8acc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment