mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-27 12:03:45 +08:00
When closing the IPv4LL state, close any timers as well.
This commit is contained in:
parent
5b3ae33d33
commit
fac143bfd1
4
arp.c
4
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);
|
||||
}
|
||||
}
|
||||
|
8
ipv4ll.c
8
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user