Skip to content

Support reapplying bridge port VLANs

Beniamino Galvani requested to merge bg/bridge-vlan-reapply into main

Summary

This MR adds support for reapplying VLANs on bridge ports.

Purpose

Currently, a new activation is needed when the VLANs are changed on a bridge port. With this change, it becomes possible to set the new VLANs without disconnecting the device.

The reapply is also useful in this situation: if the default-pvid is changed on the bridge and reapplied, the kernel automatically adds the VLAN for the PVID to ports. At this point there are both the VLAN for the old PVID and the on VLAN for the new one on the port, which might be not correct. The reapply can be used to restore the right configuration of VLANs on the port. There could be other solutions (like, when the default-pvid is changed on the bridge, NM could remove the old one from ports, however I don't think it's correct for NM to touch the ports when reapplying the connection on the bridge).

Checklist

Please read https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md before opening the merge request. In particular, check that:

  • the subject for all commits is concise and explicative
  • the message for all commits explains the reason for the change
  • the source is properly formatted
  • any relevant documentation is up to date
  • you have added unit tests if applicable
  • the NEWS file is updated when the change deserves to be mentioned, for example for new features, behavior changes, API deprecations, etc.

Resolves: https://issues.redhat.com/browse/RHEL-26750

Edited by Beniamino Galvani

Merge request reports