manager: cleanup active connections upon exit
authorBeniamino Galvani <bgalvani@redhat.com>
Fri, 22 Jan 2016 14:19:06 +0000 (15:19 +0100)
committerBeniamino Galvani <bgalvani@redhat.com>
Sat, 23 Jan 2016 09:01:21 +0000 (10:01 +0100)
When connection sharing is enabled, the removal of iptables rules is
delegated to the NMActRequest destructor; but for this to work it is
required that the object is properly dereferenced upon NM termination.

Clean up the active connections which are in DEACTIVATED state when
quitting, so that they are unexported and destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=692673

src/nm-manager.c

index c2b4e53..f647c8f 100644 (file)
@@ -4418,6 +4418,8 @@ nm_manager_stop (NMManager *self)
        /* Remove all devices */
        while (priv->devices)
                remove_device (self, NM_DEVICE (priv->devices->data), TRUE, TRUE);
+
+       _active_connection_cleanup (self);
 }
 
 static gboolean