" seconds",
ifp->name, lease->renewaltime, lease->rebindtime);
}
- if (!(ifo->options & DHCPCD_STATIC) &&
- state->new->cookie != htonl(MAGIC_COOKIE))
- state->state = DHS_IPV4LL_BOUND;
- else
- state->state = DHS_BOUND;
+ state->state = DHS_BOUND;
if (!state->lease.frominfo &&
!(ifo->options & (DHCPCD_INFORM | DHCPCD_STATIC)))
if (write_lease(ifp, state->new) == -1)
eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp);
return;
}
- /* Don't reset DHCP state if we have an IPv4LL address and link is up,
- * unless the interface is departing. */
- if (state->state != DHS_IPV4LL_BOUND ||
- ifp->carrier != LINK_UP ||
- ifp->options->options & DHCPCD_DEPARTED)
- {
- eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp);
- dhcp_auth_reset(&state->auth);
- dhcp_close(ifp);
- }
if (ifp->options->options & DHCPCD_RELEASE) {
unlink(state->leasefile);
}
}
+ eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp);
+ dhcp_auth_reset(&state->auth);
+ dhcp_close(ifp);
+
free(state->old);
state->old = state->new;
state->new = NULL;
"%s: message: %s", ifp->name, msg);
free(msg);
}
- if ((state->state == DHS_DISCOVER ||
- state->state == DHS_IPV4LL_BOUND) &&
+ if (state->state == DHS_DISCOVER &&
get_option_uint8(ifp->ctx, &tmp, dhcp,
DHO_AUTOCONFIGURE) == 0)
{
}
#endif
- if ((type == 0 || type == DHCP_OFFER) &&
- (state->state == DHS_DISCOVER || state->state == DHS_IPV4LL_BOUND))
- {
+ if ((type == 0 || type == DHCP_OFFER) && state->state == DHS_DISCOVER) {
lease->frominfo = 0;
lease->addr.s_addr = dhcp->yiaddr;
lease->cookie = dhcp->cookie;