From 91bf55879b49e589181e10ed105e455c2fc84f90 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sat, 1 Mar 2014 17:59:33 +0000 Subject: [PATCH] Correctly delete IPv6 addresses from eloop timeouts --- ipv6.c | 4 +--- ipv6nd.c | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ipv6.c b/ipv6.c index bd3ca1ff..03810a91 100644 --- a/ipv6.c +++ b/ipv6.c @@ -468,9 +468,7 @@ ipv6_freedrop_addrs(struct ipv6_addrhead *addrs, int drop, if (ifd && ap->delegating_iface != ifd) continue; TAILQ_REMOVE(addrs, ap, next); - if (ap->dadcallback) - eloop_q_timeout_delete(ap->iface->ctx->eloop, - 0, NULL, ap->dadcallback); + eloop_q_timeout_delete(ap->iface->ctx->eloop, 0, NULL, ap); /* Only drop the address if no other RAs have assigned it. * This is safe because the RA is removed from the list * before we are called. */ diff --git a/ipv6nd.c b/ipv6nd.c index 6fe43c75..5a12c69a 100644 --- a/ipv6nd.c +++ b/ipv6nd.c @@ -1510,9 +1510,8 @@ ipv6nd_probeaddrs(struct ipv6_addrhead *addrs) errno != EADDRNOTAVAIL && errno != ENXIO) syslog(LOG_ERR, "del_address6 %m"); } - if (ap->dadcallback) - eloop_q_timeout_delete(ap->iface->ctx->eloop, - 0, NULL, ap->dadcallback); + eloop_q_timeout_delete(ap->iface->ctx->eloop, + 0, NULL, ap); free(ap); } else if (!IN6_IS_ADDR_UNSPECIFIED(&ap->addr)) { ipv6nd_probeaddr(ap); -- 2.47.3