changeset 4224:595761ecbde0 draft

dhcp: reset interval during init 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.
author Roy Marples <roy@marples.name>
date Tue, 13 Feb 2018 10:33:06 +0000
parents 467600defbe4
children 8dd3a40d7df2
files src/dhcp.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/dhcp.c	Tue Feb 13 10:22:31 2018 +0000
+++ b/src/dhcp.c	Tue Feb 13 10:33:06 2018 +0000
@@ -3653,6 +3653,7 @@
 
 	state = D_STATE(ifp);
 	clock_gettime(CLOCK_MONOTONIC, &state->started);
+	state->interval = 0;
 	free(state->offer);
 	state->offer = NULL;
 	state->offer_len = 0;