]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/network/networkd-setlink.c
network/brvlan: remove unnecessary bridge vlan IDs
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 12 Nov 2023 07:04:19 +0000 (16:04 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 12 Nov 2023 18:58:46 +0000 (03:58 +0900)
commit228693af47ffb43098b5cee41f5624b8351d9efa
tree908363dce0e6d5769421cb4fba4668864eeea1d6
parent11cee6efbf54aeff25a6d106f6707ce822fa72d0
network/brvlan: remove unnecessary bridge vlan IDs

When an interface is being reconfigured with different bridge vlan
settings, this makes old vlan IDs on the interface removed.

This also makes the PVID= setting support negative boolean value, e.g. "no",
in which case, the currently assigned PVID (typically, assigned by the
kernel when an interface is joined to a bridge) is dropped.
This feature is requested by #15291.

Note, if a .network file has no settings about bridge vlan, networkd
keeps the currently assigned vlan IDs. That's intended, to make not
break existing setups.
When a .network file has only PVID=no line in [BridgeVLAN] section, then
all assigned vlan IDs are removed.

Fixes #29975.
Closes #15291.
man/systemd.network.xml
src/network/networkd-bridge-vlan.c
src/network/networkd-bridge-vlan.h
src/network/networkd-link.h
src/network/networkd-network.c
src/network/networkd-queue.c
src/network/networkd-queue.h
src/network/networkd-setlink.c