]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Correctly delete IPv6 addresses from eloop timeouts
authorRoy Marples <roy@marples.name>
Sat, 1 Mar 2014 17:59:33 +0000 (17:59 +0000)
committerRoy Marples <roy@marples.name>
Sat, 1 Mar 2014 17:59:33 +0000 (17:59 +0000)
ipv6.c
ipv6nd.c

diff --git a/ipv6.c b/ipv6.c
index bd3ca1ff4975ebe66d5e950701517043a40e4d70..03810a91560f20af2e3bfe5d1bc638387e6fc2db 100644 (file)
--- 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. */
index 6fe43c75d7bac4fea71fd4be680b8e5ff4ce6ff2..5a12c69a3c3fcd516ba47783952a7ba223e21684 100644 (file)
--- 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);