1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/net/802
Antonio Pastor 1e9b0e1c55 net: 802: LLC+SNAP OID:PID lookup on start of skb data
802.2+LLC+SNAP frames received by napi_complete_done() with GRO and DSA
have skb->transport_header set two bytes short, or pointing 2 bytes
before network_header & skb->data. This was an issue as snap_rcv()
expected offset to point to SNAP header (OID:PID), causing packet to
be dropped.

A fix at llc_fixup_skb() (a024e377ef) resets transport_header for any
LLC consumers that may care about it, and stops SNAP packets from being
dropped, but doesn't fix the problem which is that LLC and SNAP should
not use transport_header offset.

Ths patch eliminates the use of transport_header offset for SNAP lookup
of OID:PID so that SNAP does not rely on the offset at all.
The offset is reset after pull for any SNAP packet consumers that may
(but shouldn't) use it.

Fixes: fda55eca5a ("net: introduce skb_transport_header_was_set()")
Signed-off-by: Antonio Pastor <antonio.pastor@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250103012303.746521-1-antonio.pastor@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-01-04 08:06:24 -08:00
..
fc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fddi.c net: fill in MODULE_DESCRIPTION()s under net/802* 2023-10-28 11:29:28 +01:00
garp.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hippi.c net: 802: Use memset_startat() to clear struct fields 2021-11-19 11:23:23 +00:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile net: 802: remove dead leftover after ipx driver removal 2021-08-13 16:30:35 -07:00
mrp.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
p8022.c net: fill in MODULE_DESCRIPTION()s under net/802* 2023-10-28 11:29:28 +01:00
psnap.c net: 802: LLC+SNAP OID:PID lookup on start of skb data 2025-01-04 08:06:24 -08:00
stp.c net: fill in MODULE_DESCRIPTION()s under net/802* 2023-10-28 11:29:28 +01:00