From 77c8b2960abfc3a7b05ee1bc7dbfe382e9b64a3e Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 9 May 2022 10:57:56 +0200 Subject: [PATCH] device: commit l3cfg on link change only when the device is activating On link change, the configuration should be reapplied only when the device is activating. Fixes: 58287cbcc0c8 ('core: rework IP configuration in NetworkManager using layer 3 configuration') https://bugzilla.redhat.com/show_bug.cgi?id=2079054 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1216 --- src/core/devices/nm-device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index a1a024cef3..f4171630a2 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -6652,7 +6652,8 @@ device_link_changed(gpointer user_data) * so that it theoretically would also work for NMVpnConnection (although, * NMVpnConnection should become like a regular device, akin to NMDevicePpp). */ - if (!nm_device_sys_iface_state_is_external(self)) + if (priv->state >= NM_DEVICE_STATE_IP_CONFIG && priv->state <= NM_DEVICE_STATE_ACTIVATED + && !nm_device_sys_iface_state_is_external(self)) nm_device_l3cfg_commit(self, NM_L3_CFG_COMMIT_TYPE_REAPPLY, FALSE); }