Skip to content

bridge: skip VLAN filtering resetting in reapply if no vlan change changed

Gris Ge requested to merge cathay4t/NetworkManager:reapply_default_pvid into main

When doing reapply on linux bridge interface, NetworkManager will reset the VLAN filtering and default PVID which cause PVID been readded to all bridge ports regardless they are managed by NetworkManager.

This is because Linux kernel will re-add PVID to bridge port upon the changes of bridge default-pvid value.

To fix the issue, this patch introduce netlink parsing code for vlan_filtering and default_pvid of NMPlatformLnkBridge, and use that to compare desired VLAN filtering settings, skip the reset of VLAN filter if unchanged.

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

Edited by Íñigo Huguet

Merge request reports