summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/devices/nm-device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c
index 304bacaf3e..bbc2854671 100644
--- a/src/core/devices/nm-device.c
+++ b/src/core/devices/nm-device.c
@@ -14715,7 +14715,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) {
+ if (new_state == NM_DEVICE_STATE_UNMANAGED) {
+ _cancel_activation(self);
+ } else {
/* The assume check should happen before the device transitions to
* UNAVAILABLE, because in UNAVAILABLE we already clean up the IP
* configuration. Therefore, this function should never trigger a