Closed rubensfig closed 3 years ago
Initial systemd-networkd configuration:
/etc/systemd/network/10-swbridge.netdev
[NetDev]
Name=swbridge
Kind=bridge
[Bridge]
DefaultPVID=none
VLANFiltering=1
/etc/systemd/network/10-swbridge.network
[Match]
Name=swbridge
[BridgeVLAN]
VLAN=2
/etc/systemd/network/20-port7.network
[Match]
Name=port7
[Network]
Bridge=swbridge
[BridgeVLAN]
VLAN=2
PVID=2
-> will create this grouptable: groupId = 0x00020007 (L2 Interface, VLAN ID = 2, Port ID = 7): duration: 5, refCount:1 bucketIndex = 0: outputPort = 7 (Physical) popVlanTag = 0 allowVlanTranslation = 0
When updating the /etc/systemd/network/20-port7.network file
[Match]
Name=port7
[Network]
Bridge=swbridge
[BridgeVLAN]
VLAN=2
PVID=2
EgressUntagged=2
by adding EgressUntagged=2
we expect the grouptable entry mentioned before to change from popVlanTag = 0
to popVlanTag = 1
, but currently nothing changes until the configured port is detached and reattached to the bridge (either manually or by rebooting). The configuration change is however correctly reflected in the kernel, just not forwarded to the grouptables.
until the configured port is detached and reattached to the bridge
I think I stumbled over it earlier today as well and deleting and readding the vlan worked, too. I did not need to reattach the port to the bridge.
So (starting with no vlan assigned to port7):
bridge vlan add vid 2 dev port7
bridge vlan add vid 2 dev port7 pvid untagged
didn't work, but
bridge vlan add vid 2 dev port7
bridge vlan del vid 2 dev port7
bridge vlan add vid 2 dev port7 pvid untagged
worked (for me).
So maybe we miss vlan update/change notifications, if these exist, or don't properly handle them.
Expected Behavior
When updating an access ports (port only with PVID) we must be able to configure the untagged parameter on the ASIC.
When checking the grouptables, we expect
Even if the interface was not initially configured with the popVlanTag/untagged.
Actual Behavior
If the interface is initially set without untagged, we cannot change this behaviour without deleting the port from the bridge and reconfiguring it.
Steps to Reproduce the Problem
Error script:
Good script: