" seconds",
ifp->name, lease->renewaltime, lease->rebindtime);
}
- state->state = DHS_BOUND;
+ if (!(ifo->options & DHCPCD_STATIC) &&
+ state->new->cookie != htonl(MAGIC_COOKIE))
+ state->state = DHS_IPV4LL_BOUND;
+ else
+ state->state = DHS_BOUND;
if (!state->lease.frominfo &&
!(ifo->options & (DHCPCD_INFORM | DHCPCD_STATIC)))
if (write_lease(ifp, state->new) == -1)
iface->name, msg);
free(msg);
}
- if (state->state == DHS_DISCOVER &&
+ if ((state->state == DHS_DISCOVER ||
+ state->state == DHS_IPV4LL_BOUND) &&
get_option_uint8(iface->ctx, &tmp, dhcp,
DHO_AUTOCONFIGURE) == 0)
{
}
if ((type == 0 || type == DHCP_OFFER) &&
- state->state == DHS_DISCOVER)
+ (state->state == DHS_DISCOVER || state->state == DHS_IPV4LL_BOUND))
{
lease->frominfo = 0;
lease->addr.s_addr = dhcp->yiaddr;
struct dhcp_state *state = D_STATE(astate->iface);
in_addr_t fail;
- if (state->offer == NULL)
- return;
-
fail = 0;
/* RFC 3927 2.2.1, Probe Conflict Detection */
if (amsg->sip.s_addr == astate->addr.s_addr ||