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
(cherry picked from commit 4b4f18e77b)
This commit is contained in:
Beniamino Galvani 2019-11-18 11:33:43 +01:00
parent b366234a3a
commit 5a8ea69209

View file

@ -12187,7 +12187,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");