summaryrefslogtreecommitdiff
path: root/src/nm-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nm-manager.c')
-rw-r--r--src/nm-manager.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index cb4569e5ec..313b67bbad 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -796,18 +796,20 @@ remove_device (NMManager *manager, NMDevice *device, gboolean quitting)
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (manager);
if (nm_device_get_managed (device)) {
- /* When quitting, we want to leave up interfaces & connections
- * that can be taken over again (ie, "assumed") when NM restarts
- * so that '/etc/init.d/NetworkManager restart' will not distrupt
- * networking for interfaces that support connection assumption.
- * All other devices get unmanaged when NM quits so that their
- * connections get torn down and the interface is deactivated.
+ /* Leave configured interfaces up when quitting so they can be
+ * taken over again if NM starts up, and to ensure connectivity while
+ * NM is gone. Assumed connections don't get taken down even if they
+ * haven't been fully activated.
*/
if ( !nm_device_can_assume_connections (device)
|| (nm_device_get_state (device) != NM_DEVICE_STATE_ACTIVATED)
- || !quitting)
- nm_device_set_manager_managed (device, FALSE, NM_DEVICE_STATE_REASON_REMOVED);
+ || !quitting) {
+ NMActRequest *req = nm_device_get_act_request (device);
+
+ if (!req || !nm_active_connection_get_assumed (NM_ACTIVE_CONNECTION (req)))
+ nm_device_set_manager_managed (device, FALSE, NM_DEVICE_STATE_REASON_REMOVED);
+ }
}
g_signal_handlers_disconnect_matched (device, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, manager);