merge: branch 'bg/bridge-port-fix-reapply'

bridge: fix reapplying port VLANs

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2240
This commit is contained in:
Beniamino Galvani
2025-07-14 13:04:00 +00:00
2 changed files with 12 additions and 0 deletions

View File

@@ -735,6 +735,11 @@ merge_bridge_vlan_default_pvid(NMPlatformBridgeVlan *vlans, guint *num_vlans, gu
gboolean has_pvid = FALSE;
guint i;
if (default_pvid == 0) {
/* default_pvid=0 means that the default PVID is disabled. No need to merge it. */
return vlans;
}
for (i = 0; i < *num_vlans; i++) {
if (vlans[i].pvid) {
has_pvid = TRUE;

View File

@@ -14050,6 +14050,13 @@ can_reapply_change(NMDevice *self,
goto out_fail;
}
if (nm_streq(setting_name, NM_SETTING_BRIDGE_PORT_SETTING_NAME)) {
return nm_device_hash_check_invalid_keys(diffs,
NM_SETTING_BRIDGE_PORT_SETTING_NAME,
error,
NM_SETTING_BRIDGE_PORT_VLANS);
}
if (nm_streq(setting_name, NM_SETTING_SRIOV_SETTING_NAME)) {
return nm_device_hash_check_invalid_keys(diffs,
NM_SETTING_SRIOV_SETTING_NAME,