summaryrefslogtreecommitdiff
path: root/src/devices
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2016-04-04 12:52:56 +0200
committerLubomir Rintel <lkundrak@v3.sk>2016-04-04 12:52:56 +0200
commita6fb37bae2e293ebd2a8bfd3079d0e2d3a398e1f (patch)
treeaf30b2f21363a52119bfb1961215265de5b93cde /src/devices
parentf72816bf108cf3fa52ae267e3622a1f19db28b21 (diff)
downloadNetworkManager-a6fb37bae2e293ebd2a8bfd3079d0e2d3a398e1f.tar.gz
Revert "manager: don't remove the device before policy learns of ip config change"
This doesn't unexport the connection on disconnect (as opposed to device removal). This reverts commit f72816bf108cf3fa52ae267e3622a1f19db28b21.
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/nm-device.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index bf7e814739..50858333aa 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -2570,7 +2570,6 @@ void
nm_device_removed (NMDevice *self)
{
NMDevicePrivate *priv;
- NMDeviceStateReason ignored = NM_DEVICE_STATE_REASON_NONE;
g_return_if_fail (NM_IS_DEVICE (self));
@@ -2580,13 +2579,6 @@ nm_device_removed (NMDevice *self)
* Release the slave from master, but don't touch the device. */
nm_device_master_release_one_slave (priv->master, self, FALSE, NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED);
}
-
- /* Clean up IP configs; this does not actually deconfigure the
- * interface, it just disowns the configuration so that policy
- * unregisters it from the dns manager before the device itself
- * is gone from manager. */
- nm_device_set_ip4_config (self, NULL, 0, TRUE, TRUE, &ignored);
- nm_device_set_ip6_config (self, NULL, TRUE, TRUE, &ignored);
}
static gboolean
@@ -9979,6 +9971,7 @@ static void
_cleanup_generic_post (NMDevice *self, CleanupType cleanup_type)
{
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+ NMDeviceStateReason ignored = NM_DEVICE_STATE_REASON_NONE;
priv->default_route.v4_has = FALSE;
priv->default_route.v6_has = FALSE;
@@ -10000,6 +9993,11 @@ _cleanup_generic_post (NMDevice *self, CleanupType cleanup_type)
priv->linklocal6_dad_counter = 0;
+ /* Clean up IP configs; this does not actually deconfigure the
+ * interface; the caller must flush routes and addresses explicitly.
+ */
+ nm_device_set_ip4_config (self, NULL, 0, TRUE, TRUE, &ignored);
+ nm_device_set_ip6_config (self, NULL, TRUE, TRUE, &ignored);
g_clear_object (&priv->con_ip4_config);
g_clear_object (&priv->dev_ip4_config);
g_clear_object (&priv->ext_ip4_config);