checkpoint: disconnect device before reactivation during rollback
Since commit0922a17738
("manager: avoid that auto-activations preempt user activations") the manager doesn't allow a internal activation to disconnect the same connection already active on the device. Thus, during a rollback we must ensure that the device is deactivated before. Fixes:0922a17738
This commit is contained in:
@@ -275,6 +275,17 @@ activate:
|
|||||||
_LOGD ("rollback: reactivating connection %s",
|
_LOGD ("rollback: reactivating connection %s",
|
||||||
nm_settings_connection_get_uuid (connection));
|
nm_settings_connection_get_uuid (connection));
|
||||||
subject = nm_auth_subject_new_internal ();
|
subject = nm_auth_subject_new_internal ();
|
||||||
|
|
||||||
|
/* Disconnect the device if needed. This necessary because now
|
||||||
|
* the manager prevents the reactivation of the same connection by
|
||||||
|
* an internal subject. */
|
||||||
|
if ( nm_device_get_state (device) > NM_DEVICE_STATE_DISCONNECTED
|
||||||
|
&& nm_device_get_state (device) < NM_DEVICE_STATE_DEACTIVATING) {
|
||||||
|
nm_device_state_changed (device,
|
||||||
|
NM_DEVICE_STATE_DEACTIVATING,
|
||||||
|
NM_DEVICE_STATE_REASON_NEW_ACTIVATION);
|
||||||
|
}
|
||||||
|
|
||||||
if (!nm_manager_activate_connection (priv->manager,
|
if (!nm_manager_activate_connection (priv->manager,
|
||||||
connection,
|
connection,
|
||||||
dev_checkpoint->applied_connection,
|
dev_checkpoint->applied_connection,
|
||||||
|
Reference in New Issue
Block a user