From e6c7f551d551c5d9eb99a9afb20c316d17143e97 Mon Sep 17 00:00:00 2001 From: Fernando Fernandez Mancera Date: Tue, 18 Jul 2023 13:46:30 +0200 Subject: [PATCH] manager: allow controller activation if device is deactivating When activating a port connection it will require the controller connection is active or a valid controller device candidate is available for activation. One of the conditions we consider for a controller device to be a valid candidate for the connection is that it is not active, therefore we should also consider as valid a device that is currently deactivating. Otherwise, we could fail during the port activation just because the deactivation of the controller device candidate didn't finish yet. https://bugzilla.redhat.com/show_bug.cgi?id=2125615 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1693 --- src/core/nm-manager.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/nm-manager.c b/src/core/nm-manager.c index f86228ef03..9c7212202b 100644 --- a/src/core/nm-manager.c +++ b/src/core/nm-manager.c @@ -5212,7 +5212,9 @@ ensure_master_active_connection(NMManager *self, continue; if (nm_device_is_real(candidate) - && nm_device_get_state(candidate) != NM_DEVICE_STATE_DISCONNECTED) + && !NM_IN_SET(nm_device_get_state(candidate), + NM_DEVICE_STATE_DISCONNECTED, + NM_DEVICE_STATE_DEACTIVATING)) continue; master_ac = nm_manager_activate_connection(