]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
dhcp: reset interval during init
authorRoy Marples <roy@marples.name>
Tue, 13 Feb 2018 10:33:06 +0000 (10:33 +0000)
committerRoy Marples <roy@marples.name>
Tue, 13 Feb 2018 10:33:06 +0000 (10:33 +0000)
This fixes NetBSD where the lease is persisted at carrier down.
When the carrier comes back up again we need the interval
to reset to zero so that DHCP happens quicker.

src/dhcp.c

index 98767fc4325b91f62231bc11dfe13e46b8769841..096a7c45fcf15e8010488725d08da54ee68d984f 100644 (file)
@@ -3653,6 +3653,7 @@ dhcp_start1(void *arg)
 
        state = D_STATE(ifp);
        clock_gettime(CLOCK_MONOTONIC, &state->started);
+       state->interval = 0;
        free(state->offer);
        state->offer = NULL;
        state->offer_len = 0;