core: don't block startup on assumed connections
If we are assuming a connection at startup, the NMManager:startup state doesn't need to wait for that activation to complete, since the underlying device isn't going to change its configuration as a result of it. (In particular, NM considers virbr0 to be stalled at NM_DEVICE_STATE_IP_CONFIG when it assumes it, since if it has no real slaves, it won't yet have carrier. But this shouldn't block startup.)
This commit is contained in:
@@ -401,9 +401,11 @@ nm_active_connection_set_device (NMActiveConnection *self, NMDevice *device)
|
|||||||
g_signal_connect (device, "notify::master",
|
g_signal_connect (device, "notify::master",
|
||||||
G_CALLBACK (device_master_changed), self);
|
G_CALLBACK (device_master_changed), self);
|
||||||
|
|
||||||
|
if (!priv->assumed) {
|
||||||
priv->pending_activation_id = g_strdup_printf ("activation::%p", (void *)self);
|
priv->pending_activation_id = g_strdup_printf ("activation::%p", (void *)self);
|
||||||
nm_device_add_pending_action (device, priv->pending_activation_id);
|
nm_device_add_pending_action (device, priv->pending_activation_id);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -540,6 +542,11 @@ nm_active_connection_set_assumed (NMActiveConnection *self, gboolean assumed)
|
|||||||
|
|
||||||
g_return_if_fail (priv->assumed == FALSE);
|
g_return_if_fail (priv->assumed == FALSE);
|
||||||
priv->assumed = assumed;
|
priv->assumed = assumed;
|
||||||
|
|
||||||
|
if (priv->pending_activation_id) {
|
||||||
|
nm_device_remove_pending_action (priv->device, priv->pending_activation_id);
|
||||||
|
g_clear_pointer (&priv->pending_activation_id, g_free);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
Reference in New Issue
Block a user