From: Roy Marples Date: Tue, 11 Nov 2014 09:17:06 +0000 (+0000) Subject: When closing the IPv4LL state, close any timers as well. X-Git-Tag: v6.6.2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fac143bfd12fb4dc23b61ab0f6319bedb41a9045;p=thirdparty%2Fdhcpcd.git When closing the IPv4LL state, close any timers as well. --- diff --git a/arp.c b/arp.c index 8e39e73a..49d6282e 100644 --- a/arp.c +++ b/arp.c @@ -317,8 +317,10 @@ arp_free(struct arp_state *astate) eloop_timeout_delete(astate->iface->ctx->eloop, NULL, astate); state = D_STATE(astate->iface); TAILQ_REMOVE(&state->arp_states, astate, next); - if (state->arp_ipv4ll == astate) + if (state->arp_ipv4ll == astate) { + ipv4ll_stop(astate->iface); state->arp_ipv4ll = NULL; + } free(astate); } } diff --git a/ipv4ll.c b/ipv4ll.c index 7bdd75ff..8d7c7af4 100644 --- a/ipv4ll.c +++ b/ipv4ll.c @@ -249,3 +249,11 @@ ipv4ll_start(void *arg) astate->addr.s_addr = ipv4ll_pick_addr(astate); arp_probe(astate); } + +void +ipv4ll_stop(struct interface *ifp) +{ + struct dhcp_state *state = D_STATE(ifp); + + eloop_timeout_delete(ifp->ctx->eloop, NULL, state->arp_ipv4ll); +} diff --git a/ipv4ll.h b/ipv4ll.h index 803f63fd..54846dd0 100644 --- a/ipv4ll.h +++ b/ipv4ll.h @@ -31,5 +31,6 @@ void ipv4ll_start(void *); void ipv4ll_claimed(void *); void ipv4ll_handle_failure(void *); +void ipv4ll_stop(struct interface *); #endif