]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Enter reboot state with a fake lease.
authorRoy Marples <roy@marples.name>
Wed, 26 Nov 2014 11:25:39 +0000 (11:25 +0000)
committerRoy Marples <roy@marples.name>
Wed, 26 Nov 2014 11:25:39 +0000 (11:25 +0000)
dhcp.c

diff --git a/dhcp.c b/dhcp.c
index cd44eb4908ab3d737693ec280d948c812c00d251..460e7e5e9b5c797cb6566d3261a7b6c3f32b6003 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -3190,7 +3190,8 @@ dhcp_start1(void *arg)
        if (state->offer == NULL || state->offer->cookie == 0) {
                /* If we don't have an address yet, enter the reboot
                 * state to ensure at least fallback in short order. */
-               if (state->addr.s_addr == INADDR_ANY)
+               if (state->addr.s_addr == INADDR_ANY ||
+                   state->added & STATE_FAKE)
                        state->state = DHS_REBOOT;
                dhcp_discover(ifp);
        } else