[BUG] vlan-aware bridge breaks vlan on another port on same gmac

From: Frank Wunderlich
Date: Fri Jan 20 2023 - 11:46:02 EST


Hi,

noticed a bug while testing systemd, but it is reproducable with iproute2

tested on bananapi-r2 with kernel 5.15.80 and bananapi-r3 with kernel 6.2-rc1,
both use mt7530 dsa driver but different configs (mt7530 vs. mt7531).
have no other devices to test.

first create vlan on wan-port (wan and lan0 are dsa-user-ports on same gmac)

netif=wan
ip link set $netif up
ip link add link $netif name vlan110 type vlan id 110
ip link set vlan110 up
ip addr add 192.168.110.1/24 dev vlan110

vlan works now, other side pingable, vlan-tagged packets visible in tcpdump on both sides

now create the vlan-sware bridge (without vlan_filtering it works in my test)

BRIDGE=lanbr0
ip link add name ${BRIDGE} type bridge vlan_filtering 1 vlan_default_pvid 1
ip link set ${BRIDGE} up
ip link set lan0 master ${BRIDGE}
ip link set lan0 up

takes some time before it is applied and ping got lost

packets are received by other end but without vlan-tag

regards Frank