Skip to content

Fix wrong transport_header when sending VLAN-tagged frames

[email protected] bpf imx lkml netdev 1 version Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 2 repliesApplied 2/2

Changes in v2 from the cover letter

1. Move skb_probe_transport_header() to before skb_set_network_header()
2. Change the commit messages and titles
v1 link: https://lore.kernel.org/imx/[email protected]/
---

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2net: packet: fix wrong transport_header when sending VLAN-tagged framenet/packet/af_packet.c+2 -21 replyApplied
2/2net: tap: fix wrong transport_header when sending VLAN-tagged framedrivers/net/tap.c+2 -11 replyApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchWillem de Bruijn
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 net 0/2] Fix wrong transport_header when sending VLAN-tagged frames

From: Wei Fang <[email protected]>

When sending a VLAN-tagged frame via AF_PACKET or tap, calling skb_set_network_header() before skb_probe_transport_header() causes the flow dissector to misinterpret the inner protocol header as a VLAN header. As a result, transport_header is never set and remains at its uninitialized sentinel value (~0U).

Move skb_probe_transport_header() to before skb_set_network_header() so the flow dissector sees network_header still pointing to the VLAN header and can correctly identify the transport layer.

---
v2 changes:
1. Move skb_probe_transport_header() to before skb_set_network_header()
2. Change the commit messages and titles
v1 link: https://lore.kernel.org/imx/[email protected]/
---

Wei Fang (2):
net: packet: fix wrong transport_header when sending VLAN-tagged frame
net: tap: fix wrong transport_header when sending VLAN-tagged frame

 drivers/net/tap.c      | 3 ++-
 net/packet/af_packet.c | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
Signature · 1 line
2.34.1