linux/net/hsr
Felix Maurer 57622b6b1a hsr: Fix supervision frame sending on HSRv0
[ Upstream commit 96a3a03abf ]

On HSRv0, no supervision frames were sent. The supervison frames were
generated successfully, but failed the check for a sufficiently long mac
header, i.e., at least sizeof(struct hsr_ethhdr), in hsr_fill_frame_info()
because the mac header only contained the ethernet header.

Fix this by including the HSR header in the mac header when generating HSR
supervision frames. Note that the mac header now also includes the TLV
fields. This matches how we set the headers on rx and also the size of
struct hsrv0_ethhdr_sp.

Reported-by: Hangbin Liu <liuhangbin@gmail.com>
Closes: https://lore.kernel.org/netdev/aMONxDXkzBZZRfE5@fedora/
Fixes: 9cfb5e7f0d ("net: hsr: fix hsr_init_sk() vs network/transport headers.")
Signed-off-by: Felix Maurer <fmaurer@redhat.com>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://patch.msgid.link/4354114fea9a642fe71f49aeeb6c6159d1d61840.1762876095.git.fmaurer@redhat.com
Tested-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-11-24 10:35:52 +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 hsr: Fix supervision frame sending on HSRv0 2025-11-24 10:35:52 +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: Fix PRP duplicate detection 2025-05-29 11:02:20 +02:00
hsr_forward.h net: hsr: fix mac_len checks 2021-05-24 14:10:28 -07:00
hsr_framereg.c net: hsr: Fix PRP duplicate detection 2025-05-29 11:02:20 +02:00
hsr_framereg.h net: hsr: Fix PRP duplicate detection 2025-05-29 11:02:20 +02:00
hsr_main.c hsr: use hsr_for_each_port_rtnl in hsr_port_get_hsr 2025-09-19 16:35:50 +02:00
hsr_main.h hsr: use rtnl lock when iterating over ports 2025-09-19 16:35:50 +02:00
hsr_netlink.c net: hsr: remove seqnr_lock 2024-09-09 10:25:01 +01:00
hsr_netlink.h net/hsr: Remove unused function declarations 2023-07-31 20:11:47 -07:00
hsr_slave.c net, hsr: reject HSR frame if skb can't hold tag 2025-08-28 16:31:02 +02: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