Skip to content
Commit 993675a3 authored by Willem de Bruijn's avatar Willem de Bruijn Committed by David S. Miller
Browse files

packet: reset network header if packet shorter than ll reserved space



If variable length link layer headers result in a packet shorter
than dev->hard_header_len, reset the network header offset. Else
skb->mac_len may exceed skb->len after skb_mac_reset_len.

packet_sendmsg_spkt already has similar logic.

Fixes: b84bbaf7 ("packet: in packet_snd start writing at link layer allocation")
Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bab2c80e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment