From: Roy Marples Date: Thu, 16 May 2013 13:09:27 +0000 (+0000) Subject: When dropping states, delete any timeouts for DAD callbacks. X-Git-Tag: v5.99.7~66 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6743422d504d2f9be35880cf09e33ec70bc6425e;p=thirdparty%2Fdhcpcd.git When dropping states, delete any timeouts for DAD callbacks. --- diff --git a/dhcp6.c b/dhcp6.c index b279583b..67c4289c 100644 --- 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. */ diff --git a/ipv6rs.c b/ipv6rs.c index d664e06a..d2af0d68 100644 --- 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. */