device: clear dad6_failed_addrs in _cleanup_ip_pre()

We also cancel the idle handler

  nm_clear_g_source (&priv->queued_ip_config_id_x[IS_IPv4])

which means, nobody is going to process these addresses (at least
for the moment).

The purpose of "dad6_failed_addrs" is to keep track of addresses that
might be interesting for checking about DAD failures. If we are no
longer reacting on IP changes (because the idle handler was removed),
we also no longer need these addresses.
This commit is contained in:
Thomas Haller
2018-06-20 12:16:09 +02:00
parent 18ecc4b4f1
commit dbb936e5c8

View File

@@ -10260,6 +10260,8 @@ _cleanup_ip_pre (NMDevice *self, int addr_family, CleanupType cleanup_type)
dnsmasq_cleanup (self);
ipv4ll_cleanup (self);
} else {
g_slist_free_full (priv->dad6_failed_addrs, (GDestroyNotify) nmp_object_unref);
priv->dad6_failed_addrs = NULL;
g_clear_object (&priv->dad6_ip6_config);
dhcp6_cleanup (self, cleanup_type, FALSE);
nm_clear_g_source (&priv->linklocal6_timeout_id);