From 4b4f18e77b8a8a9581128089de64aed68cc735f6 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 18 Nov 2019 11:33:43 +0100 Subject: [PATCH] device: check for disconnected state before activating NMActRequest When a new activation request comes and the device is currently activated, we move the device state to 'deactivating' and wait that it reaches 'disconnected' before starting the new activation request. In the meantime, a carrier change could happen but still we have to wait that device finishes any pending deactivation. https://bugzilla.redhat.com/show_bug.cgi?id=1772960 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/339 --- src/devices/nm-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 62243d45af..e7291f0b54 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -12357,7 +12357,7 @@ _carrier_wait_check_queued_act_request (NMDevice *self) _LOGD (LOGD_DEVICE, "Cancel queued activation request as we have no carrier after timeout"); _clear_queued_act_request (priv, NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED); - } else { + } else if (priv->state == NM_DEVICE_STATE_DISCONNECTED) { gs_unref_object NMActRequest *queued_req = NULL; _LOGD (LOGD_DEVICE, "Activate queued activation request as we now have carrier");