static int
dhcp_arp_address(struct interface *ifp)
{
- const struct dhcp_state *state;
+ struct dhcp_state *state;
struct in_addr addr;
struct ipv4_addr *ia;
struct arp_state *astate;
eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp);
- state = D_CSTATE(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
/* Before we supported FORCERENEW we closed off the raw
* port so we effectively ignored all messages.
* As such we'll not log by default here. */
- //log_dhcp(LOG_DEBUG, "bound, ignoring", iface, dhcp, from);
+ //log_dhcp(LOG_DEBUG, "bound, ignoring", ifp, dhcp, from);
return;
}
inet_ntoa(*from));
return;
}
+
+ if (state->state == DHS_PROBE) {
+ /* Ignore any DHCP messages whilst probing a lease to bind. */
+ log_dhcp(LOG_DEBUG, "probing, ignoring", ifp, dhcp, from);
+ return;
+ }
+
/* reset the message counter */
state->interval = 0;
rt->net.s_addr = INADDR_BROADCAST;
COPYOUT(rt->gate, rti_info[RTAX_GATEWAY]);
COPYOUT(rt->src, rti_info[RTAX_IFA]);
-
- if (rtm->rtm_inits & RTV_MTU)
- rt->mtu = (unsigned int)rtm->rtm_rmx.rmx_mtu;
+ rt->mtu = (unsigned int)rtm->rtm_rmx.rmx_mtu;
if (rtm->rtm_index)
rt->iface = if_findindex(ctx->ifaces, rtm->rtm_index);
} else
ipv6_mask(&rt->net, 128);
COPYOUT6(rt->gate, rti_info[RTAX_GATEWAY]);
-
- if (rtm->rtm_inits & RTV_MTU)
- rt->mtu = (unsigned int)rtm->rtm_rmx.rmx_mtu;
+ rt->mtu = (unsigned int)rtm->rtm_rmx.rmx_mtu;
if (rtm->rtm_index)
rt->iface = if_findindex(ctx->ifaces, rtm->rtm_index);