Mercurial > hg > dhcpcd
changeset 4191:30f5f070a4aa draft
dhcp: set probe state only when probing.
This fixes the REBIND reason.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Thu, 07 Dec 2017 20:44:13 +0000 |
| parents | c1890895e21c |
| children | 72557c2f086e |
| files | src/dhcp.c |
| diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dhcp.c Thu Dec 07 18:33:20 2017 +0000 +++ b/src/dhcp.c Thu Dec 07 20:44:13 2017 +0000 @@ -2385,7 +2385,6 @@ eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp); state = D_STATE(ifp); - state->state = DHS_PROBE; addr.s_addr = state->offer->yiaddr == INADDR_ANY ? state->offer->ciaddr : state->offer->yiaddr; /* If the interface already has the address configured @@ -2398,6 +2397,7 @@ #ifdef IN_IFF_TENTATIVE if (ia == NULL || ia->addr_flags & IN_IFF_NOTUSEABLE) { + state->state = DHS_PROBE; if (ia == NULL) { struct dhcp_lease l; @@ -2413,6 +2413,7 @@ if (ifp->options->options & DHCPCD_ARP && ia == NULL) { struct dhcp_lease l; + state->state = DHS_PROBE; get_lease(ifp, &l, state->offer, state->offer_len); loginfox("%s: probing address %s/%d", ifp->name, inet_ntoa(l.addr), inet_ntocidr(l.mask));
