]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
When dropping states, delete any timeouts for DAD callbacks.
authorRoy Marples <roy@marples.name>
Thu, 16 May 2013 13:09:27 +0000 (13:09 +0000)
committerRoy Marples <roy@marples.name>
Thu, 16 May 2013 13:09:27 +0000 (13:09 +0000)
dhcp6.c
ipv6rs.c

diff --git a/dhcp6.c b/dhcp6.c
index b279583b102cd6ac573608306e6dcd1cf24d3912..67c4289cb60dcb6a22ad41a7b555dbc315692907 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -607,6 +607,8 @@ dhcp6_freedrop_addrs(struct interface *ifp, int drop)
        state = D6_STATE(ifp);
        while ((ap = TAILQ_FIRST(&state->addrs))) {
                TAILQ_REMOVE(&state->addrs, ap, next);
+               if (ap->dadcallback)
+                       eloop_timeout_delete(NULL, ap->dadcallback);
                /* 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 d664e06a7ecc80c1b01fb50e990276138bafa987..d2af0d68deb4f4ceb8ba5f997dc41fde621da318 100644 (file)
--- a/ipv6rs.c
+++ b/ipv6rs.c
@@ -305,6 +305,8 @@ ipv6rs_freedrop_addrs(struct ra *rap, int drop)
 
        while ((ap = TAILQ_FIRST(&rap->addrs))) {
                TAILQ_REMOVE(&rap->addrs, ap, next);
+               if (ap->dadcallback)
+                       eloop_timeout_delete(NULL, ap->dadcallback);
                /* 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. */