From: Roy Marples Date: Thu, 7 Dec 2017 20:44:13 +0000 (+0000) Subject: dhcp: set probe state only when probing. X-Git-Tag: v7.0.0~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a04a2b683247b13a235a5680ded378558cf2d5c6;p=thirdparty%2Fdhcpcd.git dhcp: set probe state only when probing. This fixes the REBIND reason. --- diff --git a/src/dhcp.c b/src/dhcp.c index e8c07250..44d99fe2 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -2385,7 +2385,6 @@ dhcp_arp_address(struct interface *ifp) 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 @@ dhcp_arp_address(struct interface *ifp) #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 @@ dhcp_arp_address(struct interface *ifp) 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));