diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2023-04-07 14:48:49 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2023-04-11 09:59:59 +0200 |
commit | cae8903abb9d7b8246d23b0b43272722ff0d2493 (patch) | |
tree | fa86fe3dbbf4bc6854b55e4988a77606e8f36cf2 | |
parent | 115634d3b13f8594d2fb523c3794cdbb2f5cfc74 (diff) | |
download | NetworkManager-nm-1-38.tar.gz |
device: stop activation when queueing the unmanaged statenm-1-38
When the unmanaged state is queued, we must ensure that the current
activation doesn't overwrite the queue stated with a new one. This can
happen for example if a dispatcher script or a firewall call
terminate, or if the next activation stage is dispatched.
Fixes-test: @preserve_master_and_ip_settings
https://bugzilla.redhat.com/show_bug.cgi?id=2178269
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1599
(cherry picked from commit 89a8f51235b7cc9c39c2aea8ff717da4e051f8e6)
(cherry picked from commit b2ed01efc981fd3c6a32aac1f29d4e622e2ae305)
(cherry picked from commit 5f9547dcc148f656d57973434b9cf96a3bc71b8f)
-rw-r--r-- | src/core/devices/nm-device.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index c300df1a8e..1ec80eadcb 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -14134,6 +14134,9 @@ _set_unmanaged_flags(NMDevice *self, if (transition_state) { new_state = was_managed ? NM_DEVICE_STATE_UNMANAGED : NM_DEVICE_STATE_UNAVAILABLE; + if (new_state == NM_DEVICE_STATE_UNMANAGED) { + _cancel_activation(self); + } if (now) nm_device_state_changed(self, new_state, reason); else |