Commit Graph
8 Commits
Author SHA1 Message Date
Yu Watanabe 228693af47 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.
2023-11-13 03:58:46 +09:00
Yu Watanabe 11cee6efbf network/brvlan: read bridge vlan IDs through netlink and save them
In this commit, obtained vlan IDs are not used, but they will be used in
the later commits.
2023-11-13 03:58:46 +09:00
Yu Watanabe f269016c3e network/brvlan: make [BridgeVLAN] settings support an empty string
This also renames Network.pvid and friends.
2023-11-13 03:58:46 +09:00
Yu Watanabe 26ba67e5ec network/brvlan: rework bridge vlan ID assignment
No functional change, just refactoring.
2023-11-13 03:58:46 +09:00
Yu Watanabe 1187fc3375 network: use link_request_to_set_master() or friends 2021-06-08 06:39:48 +09:00
Yu Watanabe 5106ad00e6 network: expose bridge_vlan_append_info() 2021-06-08 06:34:38 +09:00
Yu Watanabe 5546870e7b network: introduce network_adjust_bridge_vlan() 2021-06-08 06:33:27 +09:00
Yu Watanabe 9670e45a6e network: rename networkd-brvlan.[ch] -> networkd-bridge-vlan.[ch] 2021-06-08 06:33:27 +09:00