core: merge branch 'th/mtu-during-assume'

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1576
This commit is contained in:
Thomas Haller
2023-03-27 08:56:35 +02:00

View File

@@ -3043,6 +3043,7 @@ nm_device_sys_iface_state_set(NMDevice *self, NMDeviceSysIfaceState sys_iface_st
nm_device_sys_iface_state_to_string(sys_iface_state));
priv->sys_iface_state_ = sys_iface_state;
_dev_l3_cfg_commit_type_reset(self);
nm_device_l3cfg_commit(self, NM_L3_CFG_COMMIT_TYPE_AUTO, FALSE);
}
/* this function only sets a flag, no immediate actions are initiated.
@@ -11326,10 +11327,8 @@ _commit_mtu(NMDevice *self)
if (ifindex <= 0)
return;
if (!nm_device_get_applied_connection(self)
|| nm_device_sys_iface_state_is_external_or_assume(self)) {
/* we don't tamper with the MTU of disconnected and
* external/assumed devices. */
if (!nm_device_get_applied_connection(self) || nm_device_sys_iface_state_is_external(self)) {
/* we don't tamper with the MTU of disconnected and external devices. */
return;
}