summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Giudici <fgiudici@redhat.com>2017-05-11 17:54:44 +0200
committerFrancesco Giudici <fgiudici@redhat.com>2017-06-09 17:38:53 +0200
commitc994015d7f85b50eae22b405da60572da7cde273 (patch)
tree9e70054659e6d4f4eff29fd1acf70ec168b2b128
parent9dfef3577b776e096ca639023af6bc4a043bef8e (diff)
downloadNetworkManager-c994015d7f85b50eae22b405da60572da7cde273.tar.gz
device: always sync IPv6 address removal between platform and config
-rw-r--r--src/devices/nm-device.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 4fa6689842..cce94b0887 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -10919,6 +10919,11 @@ device_ipx_changed (NMPlatform *platform,
priv->dad6_failed_addrs = g_slist_append (priv->dad6_failed_addrs,
g_memdup (addr, sizeof (NMPlatformIP6Address)));
}
+ /* We should remove addresses we generated also if the device has become
+ * unmanaged: this is required in order to avoid races when the device is
+ * quickly set back to managed */
+ if ((change_type == NM_PLATFORM_SIGNAL_REMOVED) && priv->ip6_config)
+ nm_ip6_config_search_and_del_address (priv->ip6_config, addr);
/* fall through */
case NMP_OBJECT_TYPE_IP6_ROUTE:
if (nm_device_get_unmanaged_flags (self, NM_UNMANAGED_PLATFORM_INIT)) {