diff options
author | Fernando Fernandez Mancera <ffmancera@riseup.net> | 2023-07-18 13:46:30 +0200 |
---|---|---|
committer | Fernando Fernandez Mancera <ffmancera@riseup.net> | 2023-07-19 12:07:38 +0200 |
commit | e6c7f551d551c5d9eb99a9afb20c316d17143e97 (patch) | |
tree | 3c7af23f6a0fae38034558fd10661e1e7354be11 | |
parent | d441f846b2065ed896cd869df9209217189a855c (diff) |
manager: allow controller activation if device is deactivatingff/reattach_unmanaged_ports
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
-rw-r--r-- | src/core/nm-manager.c | 4 |
1 files changed, 3 insertions, 1 deletions
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( |