]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
When we transition from REQUEST to DISCOVER in a reboot, start
authorRoy Marples <roy@marples.name>
Fri, 24 Oct 2014 20:30:38 +0000 (20:30 +0000)
committerRoy Marples <roy@marples.name>
Fri, 24 Oct 2014 20:30:38 +0000 (20:30 +0000)
IPv4LL at the same time as discover to ensure we have an address quicker.

dhcp.c

diff --git a/dhcp.c b/dhcp.c
index aa1d06859afd5ac9321309520480d8ac82184659..b7de69d19c2d6aa4ffa93868cd4480e2162481e3 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -2131,6 +2131,13 @@ dhcp_reboot(struct interface *ifp)
        state->xid = dhcp_xid(ifp);
        state->lease.server.s_addr = 0;
        eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp);
+
+       /* Need to add this before dhcp_expire and friends. */
+       if (!ifo->fallback && ifo->reboot && ifo->options & DHCPCD_IPV4LL &&
+           !IN_LINKLOCAL(htonl(state->addr.s_addr)))
+               eloop_timeout_add_sec(ifp->ctx->eloop,
+                   ifo->reboot, ipv4ll_start, ifp);
+
        if (ifo->fallback)
                eloop_timeout_add_sec(ifp->ctx->eloop,
                    ifo->reboot, dhcp_fallback, ifp);