linux-stable/net/hsr
Eric Dumazet 9cfb5e7f0d net: hsr: fix hsr_init_sk() vs network/transport headers.
Following sequence in hsr_init_sk() is invalid :

    skb_reset_mac_header(skb);
    skb_reset_mac_len(skb);
    skb_reset_network_header(skb);
    skb_reset_transport_header(skb);

It is invalid because skb_reset_mac_len() needs the correct
network header, which should be after the mac header.

This patch moves the skb_reset_network_header()
and skb_reset_transport_header() before
the call to dev_hard_header().

As a result skb->mac_len is no longer set to a value
close to 65535.

Fixes: 48b491a5cc ("net: hsr: fix mac_len checks")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: George McCollister <george.mccollister@gmail.com>
Link: https://patch.msgid.link/20241122171343.897551-1-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-11-26 12:45:53 +01:00
..
hsr_debugfs.c Revert "net: hsr: use hlist_head instead of list_head for mac addresses" 2022-12-01 20:26:20 -08:00
hsr_device.c net: hsr: fix hsr_init_sk() vs network/transport headers. 2024-11-26 12:45:53 +01:00
hsr_device.h net: hsr: Provide RedBox support (HSR-SAN) 2024-04-26 12:04:43 +02:00
hsr_forward.c net: hsr: Add VLAN support 2024-11-11 16:40:44 -08:00
hsr_forward.h net: hsr: fix mac_len checks 2021-05-24 14:10:28 -07:00
hsr_framereg.c net: hsr: Send supervisory frames to HSR network with ProxyNodeTable data 2024-06-14 08:21:46 +01:00
hsr_framereg.h net: hsr: Send supervisory frames to HSR network with ProxyNodeTable data 2024-06-14 08:21:46 +01:00
hsr_main.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
hsr_main.h net: hsr: Remove interlink_sequence_nr. 2024-09-11 15:49:07 -07:00
hsr_netlink.c net: convert to nla_get_*_default() 2024-11-11 10:32:06 -08:00
hsr_netlink.h net/hsr: Remove unused function declarations 2023-07-31 20:11:47 -07:00
hsr_slave.c net: hsr: Use the seqnr lock for frames received via interlink port. 2024-09-11 15:49:07 -07:00
hsr_slave.h net: prp: add packet handling support 2020-07-27 12:20:40 -07:00
Kconfig hsr: enhance netlink socket interface to support PRP 2020-07-27 12:20:40 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00