]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: dsa: tag_brcm: legacy: fix untagged rx on unbridged ports for bcm63xx
authorJonas Gorski <jonas.gorski@gmail.com>
Mon, 27 Oct 2025 19:46:21 +0000 (20:46 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 31 Oct 2025 23:28:10 +0000 (16:28 -0700)
commit3d18a84eddde169d6dbf3c72cc5358b988c347d0
tree37f689a6461859032a63553c21ff982833e38694
parent5a89b27afd3d010680f9355f7ff5b048cfe89333
net: dsa: tag_brcm: legacy: fix untagged rx on unbridged ports for bcm63xx

The internal switch on BCM63XX SoCs will unconditionally add 802.1Q VLAN
tags on egress to CPU when 802.1Q mode is enabled. We do this
unconditionally since commit ed409f3bbaa5 ("net: dsa: b53: Configure
VLANs while not filtering").

This is fine for VLAN aware bridges, but for standalone ports and vlan
unaware bridges this means all packets are tagged with the default VID,
which is 0.

While the kernel will treat that like untagged, this can break userspace
applications processing raw packets, expecting untagged traffic, like
STP daemons.

This also breaks several bridge tests, where the tcpdump output then
does not match the expected output anymore.

Since 0 isn't a valid VID, just strip out the VLAN tag if we encounter
it, unless the priority field is set, since that would be a valid tag
again.

Fixes: 964dbf186eaa ("net: dsa: tag_brcm: add support for legacy tags")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://patch.msgid.link/20251027194621.133301-1-jonas.gorski@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/dsa/tag_brcm.c