mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-06 17:14:02 +00:00
device: do not set dependency failed for port if master is reconnecting
When a master is re-enslaved, it will be deactivated and reconnecting immediately, as a result, we should not set the dependency-failed for its port. Otherwise, we may risk blocking the autoconnect of port connections with higher autoconnect-priority. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1725 https://gitlab.freedesktop.org/NetworkManager/NetworkManager-ci/-/merge_requests/1473
This commit is contained in:
parent
510952b036
commit
4d0cf4924f
|
@ -9746,10 +9746,16 @@ activate_stage1_device_prepare(NMDevice *self)
|
||||||
master = nm_active_connection_get_master(active);
|
master = nm_active_connection_get_master(active);
|
||||||
if (master) {
|
if (master) {
|
||||||
if (nm_active_connection_get_state(master) >= NM_ACTIVE_CONNECTION_STATE_DEACTIVATING) {
|
if (nm_active_connection_get_state(master) >= NM_ACTIVE_CONNECTION_STATE_DEACTIVATING) {
|
||||||
|
NMDevice *master_device = nm_active_connection_get_device(master);
|
||||||
|
NMDeviceStateReason failure_reason = NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED;
|
||||||
|
|
||||||
_LOGD(LOGD_DEVICE, "master connection is deactivating");
|
_LOGD(LOGD_DEVICE, "master connection is deactivating");
|
||||||
nm_device_state_changed(self,
|
|
||||||
NM_DEVICE_STATE_FAILED,
|
if (master_device && NM_DEVICE_GET_PRIVATE(master_device)->queued_act_request) {
|
||||||
NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED);
|
/* if the controller is going to activate again, don't block this device */
|
||||||
|
failure_reason = NM_DEVICE_STATE_REASON_NONE;
|
||||||
|
}
|
||||||
|
nm_device_state_changed(self, NM_DEVICE_STATE_FAILED, failure_reason);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* If the master connection is ready for slaves, attach ourselves */
|
/* If the master connection is ready for slaves, attach ourselves */
|
||||||
|
|
Loading…
Reference in a new issue