diff --git a/src/core/devices/nm-device-bridge.c b/src/core/devices/nm-device-bridge.c index 7c34fde07..45cdd83f0 100644 --- a/src/core/devices/nm-device-bridge.c +++ b/src/core/devices/nm-device-bridge.c @@ -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; diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 9e0a53cd3..c30d01814 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -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,