diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2022-05-09 10:57:56 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2022-05-09 14:58:57 +0200 |
commit | 77c8b2960abfc3a7b05ee1bc7dbfe382e9b64a3e (patch) | |
tree | 5e5c25f151bd7993e19bca1359f9ab8c2bd8c712 | |
parent | 6525e8a7d7e081cfec911c33b036a9145f5f8672 (diff) | |
download | NetworkManager-77c8b2960abfc3a7b05ee1bc7dbfe382e9b64a3e.tar.gz |
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
-rw-r--r-- | src/core/devices/nm-device.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |