kernel: generic: patch: 802.2+LLC - set transport_header offset
authorAntonio Pastor <antonio.pastor@gmail.com>
Fri, 20 Dec 2024 16:28:45 +0000 (11:28 -0500)
committerRobert Marko <robimarko@gmail.com>
Sat, 28 Dec 2024 09:55:59 +0000 (10:55 +0100)
commitda7ab64f1f6d72597a1c8a8bb3b57409227bc635
tree8f16b980ad9b28a7c3361861fec5e430890c80ae
parent0cba20f0820efa9ac7a728206a3bde43719ced6d
kernel: generic: patch: 802.2+LLC - set transport_header offset

Conversion to DSA broke 802.2+LLC+SNAP packet processing. Frames
received by napi_complete_done with GRO and DSA have transport_header
set two bytes short, or pointing 2 bytes before network_header &
skb->data. As snap_rcv expects transport_header to point to SNAP
header (OID:PID) after LLC processing advances offset over LLC header
(llc_rcv & llc_fixup_skb), code doesn't find a match and packet is
dropped.

Image built at this commit operates properly:
  86dadeba48 - generic: add patch for GPON-ONU-34-20BI quirk
Image built at following commit exhibits the issue:
  337e36e0ef - ipq806x: convert each device to DSA implementation

As issue is LLC specific, to avoid impacting non-LLC traffic, and to
follow up on original assumption made on kernel commit fda55eca5a33
("net: introduce skb_transport_header_was_set()") stating "network
stacks usually reset the transport header anyway", llc_fixup_skb to
reset and advance the offset. llc_fixup_skb already assumes the LLC
header is at skb->data, and by definition SNAP header immediately
follows.

Signed-off-by: Antonio Pastor <antonio.pastor@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17220
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/generic/backport-6.6/902-net-llc-reset-skb-transport_header.patch [new file with mode: 0644]