Mercurial > hg > dhcpcd
changeset 2487:72b5524c9b30 draft
Only remove the interface from the list once all callouts have been
completed.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Fri, 16 May 2014 15:03:28 +0000 |
| parents | ce30b6f4c921 |
| children | c2fe62e8d4e1 |
| files | dhcpcd.c |
| diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/dhcpcd.c Fri May 16 15:02:58 2014 +0000 +++ b/dhcpcd.c Fri May 16 15:03:28 2014 +0000 @@ -301,8 +301,6 @@ syslog(LOG_INFO, "%s: removing interface", ifp->name); ifp->options->options |= DHCPCD_STOPPING; - // Remove the interface from our list - TAILQ_REMOVE(ifp->ctx->ifaces, ifp, next); dhcp6_drop(ifp, NULL); ipv6nd_drop(ifp); dhcp_drop(ifp, "STOP"); @@ -311,7 +309,11 @@ script_runreason(ifp, "DEPARTED"); else script_runreason(ifp, "STOPPED"); + + // Remove the interface from our list + TAILQ_REMOVE(ifp->ctx->ifaces, ifp, next); if_free(ifp); + if (!(ctx->options & (DHCPCD_MASTER | DHCPCD_TEST))) eloop_exit(ctx->eloop, EXIT_FAILURE); }
