linux/net/hsr
Luka Gejak 178d48df11 net: hsr: fix VLAN add unwind on slave errors
[ Upstream commit 2e3514e63b ]

When vlan_vid_add() fails for a secondary slave, the error path calls
vlan_vid_del() on the failing port instead of the peer slave that had
already succeeded. This results in asymmetric VLAN state across the HSR
pair.

Fix this by switching to a centralized unwind path that removes the VID
from any slave device that was already programmed.

Fixes: 1a8a63a530 ("net: hsr: Add VLAN CTAG filter support")
Signed-off-by: Luka Gejak <luka.gejak@linux.dev>
Link: https://patch.msgid.link/20260401092243.52121-3-luka.gejak@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-04-18 10:33:31 +02:00
..
hsr_debugfs.c /net/hsr: fix misspellings using codespell tool 2021-03-18 19:13:41 -07:00
hsr_device.c net: hsr: fix VLAN add unwind on slave errors 2026-04-18 10:33:31 +02:00
hsr_device.h net: hsr: add offloading support 2021-02-11 13:24:44 -08:00
hsr_forward.c net/hsr: fix NULL pointer dereference in prp_get_untagged_frame() 2026-01-19 13:09:46 +01:00
hsr_forward.h net: hsr: fix mac_len checks 2021-05-24 14:10:28 -07:00
hsr_framereg.c hsr: Fix uninit-value access in hsr_get_node() 2024-03-26 18:21:35 -04:00
hsr_framereg.h hsr: Synchronize sequence number updates. 2022-12-31 13:14:15 +01:00
hsr_main.c hsr: use hsr_for_each_port_rtnl in hsr_port_get_hsr 2025-10-02 13:39:04 +02:00
hsr_main.h hsr: use rtnl lock when iterating over ports 2025-10-02 13:39:04 +02:00
hsr_netlink.c genetlink: move to smaller ops wherever possible 2020-10-02 19:11:11 -07:00
hsr_netlink.h hsr: enhance netlink socket interface to support PRP 2020-07-27 12:20:40 -07:00
hsr_slave.c net: hsr: hsr_slave: Fix the promiscuous mode in offload mode 2025-10-02 13:39:05 +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