From 6075862f97394014a31f9c843737b95e948e20f8 Mon Sep 17 00:00:00 2001 From: Milan Lenco Date: Mon, 13 Oct 2025 12:50:44 +0200 Subject: [PATCH] Handle EINVAL when enabling VLAN filtering on Linux 6.12 On Linux 6.12, attempting to enable VLAN filtering on a bridge that is not yet ready may return EINVAL instead of EBUSY. Update VLANBridgeConfigurator to treat both EBUSY and EINVAL as indications that the bridge is busy, ensuring proper retry behavior. Note that the code retries for up to 1 minute. If EINVAL occurs due to an actual invalid argument, the error will eventually be returned instead of looping indefinitely. Signed-off-by: Milan Lenco --- pkg/pillar/nireconciler/linuxitems/vlanbridge.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/pillar/nireconciler/linuxitems/vlanbridge.go b/pkg/pillar/nireconciler/linuxitems/vlanbridge.go index 3e7c2d8c8d8..374330b65f8 100644 --- a/pkg/pillar/nireconciler/linuxitems/vlanbridge.go +++ b/pkg/pillar/nireconciler/linuxitems/vlanbridge.go @@ -123,7 +123,9 @@ func (c *VLANBridgeConfigurator) setVlanFiltering( } err = netlink.BridgeSetVlanFiltering(link, enable) if err != nil { - brIsBusy = errors.Is(err, unix.EBUSY) + // On Linux 6.12, we get EINVAL instead of EBUSY when bridge is not yet + // ready for VLAN filtering to be enabled. + brIsBusy = errors.Is(err, unix.EBUSY) || errors.Is(err, unix.EINVAL) return brIsBusy, fmt.Errorf("failed to set VLAN filtering to %t for bridge %s: %w", enable, brIfName, err) }