Yes, this is the behaviour I see too. So it's definitely not working like we need it to.
What I meant is that I can make this simple use case "work" with filtering:
clean boot without any matching bridge-vlan entries i /e/c/network to avoid having filtering enabled automatically.
So I start with this, where lan8 is connected to a trunk port accepting VLAN 203 on the other side:
root@OpenWrt:/# brctl show
bridge name bridge id STP enabled interfaces
br-lan 7fff.bccf4fd16b32 no lan8
lan3
root@OpenWrt:/# bridge vlan
port vlan-id
lan3 1 PVID Egress Untagged
lan8 1 PVID Egress Untagged
br-lan 1 PVID Egress Untagged
203
root@OpenWrt:/# ifconfig br-lan.203
br-lan.203 Link encap:Ethernet HWaddr BC:CF:4F:D1:6B:32
inet addr:192.168.99.51 Bcast:192.168.99.255 Mask:255.255.255.0
inet6 addr: fe80::becf:4fff:fed1:6b32/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:319 errors:0 dropped:0 overruns:0 frame:0
TX packets:225 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25124 (24.5 KiB) TX bytes:21322 (20.8 KiB)
root@OpenWrt:/# grep . /sys/class/net/br-lan/bridge/vlan_filtering
0
This state works in the meaning that there are VLAN 203 tagged packets coming out of lan8, and the VLAN 203 tagged packets received on lan8 are swtitched to the CPU port and end up on the subinterface there.
Enabling vlan_filtering in this state break this connectivity as expected. But then adding VLAN 203 to port lan8, makes it work again:
root@OpenWrt:/# echo 1 >/sys/class/net/br-lan/bridge/vlan_filtering
[ 420.852915] rtl838x_vlan_filtering: port 10
[ 420.858389] rtl838x_vlan_filtering: port 15
root@OpenWrt:/# bridge vlan add vid 203 dev lan8
[ 490.599784] rtl838x_vlan_prepare: port 15
[ 490.604344] VLAN 0: L2 learning: 0, L2 Unknown MultiCast Field 0, IPv4 Unknown MultiCast Field 0, IPv6 Unknown MultiCast Field: 0
[ 490.604367] Tagged ports 10008400, untag 1fffffff, prof 0, MC# 0, UC# 0, FID 0
[ 490.625525] rtl838x_vlan_prepare: port 28
[ 490.630014] VLAN 0: L2 learning: 0, L2 Unknown MultiCast Field 0, IPv4 Unknown MultiCast Field 0, IPv6 Unknown MultiCast Field: 0
[ 490.630034] Tagged ports 10008400, untag 1fffffff, prof 0, MC# 0, UC# 0, FID 0
[ 490.651191] rtl838x_vlan_add port 15, vid_end 203, vid_end 203, flags 0
[ 490.658581] rtl838x_vlan_add port 28, vid_end 203, vid_end 203, flags 0
root@OpenWrt:/# bridge vlan
port vlan-id
lan3 1 PVID Egress Untagged
lan8 1 PVID Egress Untagged
203
br-lan 1 PVID Egress Untagged
203
A ping from the other side og the link, showing the exact moment when I added the VLAN. Note the DUP. I typically see that at this point:
From 192.168.99.1 icmp_seq=24288 Destination Host Unreachable
From 192.168.99.1 icmp_seq=24289 Destination Host Unreachable
From 192.168.99.1 icmp_seq=24290 Destination Host Unreachable
From 192.168.99.1 icmp_seq=24291 Destination Host Unreachable
From 192.168.99.1 icmp_seq=24292 Destination Host Unreachable
From 192.168.99.1 icmp_seq=24293 Destination Host Unreachable
From 192.168.99.1 icmp_seq=24294 Destination Host Unreachable
From 192.168.99.1 icmp_seq=24295 Destination Host Unreachable
64 bytes from 192.168.99.51: icmp_seq=24297 ttl=64 time=24.1 ms
64 bytes from 192.168.99.51: icmp_seq=24297 ttl=64 time=24.3 ms (DUP!)
64 bytes from 192.168.99.51: icmp_seq=24298 ttl=64 time=0.506 ms
64 bytes from 192.168.99.51: icmp_seq=24299 ttl=64 time=0.493 ms
64 bytes from 192.168.99.51: icmp_seq=24300 ttl=64 time=0.510 ms
64 bytes from 192.168.99.51: icmp_seq=24301 ttl=64 time=0.502 ms
64 bytes from 192.168.99.51: icmp_seq=24302 ttl=64 time=0.537 ms
So this is what I meant by "working". There are lots of issues. I have not been able to do this after netifd has configured VLANs and therefore filtering. I don't know why. And filtering on the CPU port doesn't exist at all, for good and for bad. And I cannot make this work with any untagged port.
With some luck. all of these issues are related to the same minor bug 