]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: hsr: fix VLAN add unwind on slave errors
authorLuka Gejak <luka.gejak@linux.dev>
Wed, 1 Apr 2026 09:22:43 +0000 (11:22 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 2 Apr 2026 15:23:49 +0000 (08:23 -0700)
commit2e3514e63bfb0e972b1f19668547a455d0129e88
treedda28de72cca746390af06d431e91dd9b2c99239
parentf5df2990c364d1ac596d24b3118dbc56503f7cd4
net: hsr: fix VLAN add unwind on slave errors

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: 1a8a63a5305e ("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>
net/hsr/hsr_device.c