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
(cherry picked from commit fb362e0583)
This commit is contained in:
Fernando Fernandez Mancera 2023-07-18 13:46:30 +02:00
parent 5ca93db692
commit 43f244ef2e

View file

@ -4632,7 +4632,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(