Mercurial > hg > dhcpcd
changeset 2826:8e79cc844b8a draft
Reset DHCP state when carrier goes down.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Sat, 25 Oct 2014 09:54:11 +0000 |
| parents | b39c3b7ecd13 |
| children | c93e8882c7f1 |
| files | dhcp.c |
| diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dhcp.c Sat Oct 25 09:52:21 2014 +0000 +++ b/dhcp.c Sat Oct 25 09:54:11 2014 +0000 @@ -2172,7 +2172,8 @@ eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp); return; } - if (state->state != DHS_IPV4LL_BOUND) { + /* Don't reset DHCP state if we have an IPv4LL address and link is up */ + if (state->state != DHS_IPV4LL_BOUND || ifp->carrier != LINK_UP) { eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp); dhcp_auth_reset(&state->auth); dhcp_close(ifp);
