summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@kernel.org>2026-10-28 13:26:59 +0100
committerJakub Kicinski <kuba@kernel.org>2026-10-29 09:11:20 -0700
commit2519a6fe7a8bba57a961eb804e43e7df35ac40fe (patch)
tree52d75d1b71235d40cd2f0ed9387028e99f9f1607 /include/linux/debugobjects.h
parentb7ff0e7a9ae3df2f123807a7e670bc348b1e1b9d (diff)
net: add eth_type_trans_careful()
eth_type_trans() assumes ETH_HLEN bytes are present in skb->head. NIC drivers always provide this, and they should keep using the fast version. Devices looping skbs from their transmit path back to their receive path get skbs built by the stack instead. Their link-layer header might have been popped by tc actions (act_vlan pop_eth, act_ife decode) or OVS actions (pop_eth + pop_mpls / pop_nsh), leaving fewer than ETH_HLEN bytes in the linear part. eth_type_trans() then hits the BUG() in __skb_pull(). Add eth_type_trans_careful(), which first pulls the Ethernet header, and returns a drop reason on failure, so that the few devices exposed to this can drop such packets. Signed-off-by: Eric Dumazet <edumazet@kernel.org> Reviewed-by: Aaron Conole <aconole@redhat.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com> Tested-by: Jamal Hadi Salim <jhs@mojatatu.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261028122703.2093730-2-edumazet@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions