summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2021-02-28 17:33:45 +0000
committerkrw <krw@openbsd.org>2021-02-28 17:33:45 +0000
commit7fdf91fc462d506a44a895a5aff6964f7e05860f (patch)
treead5ea4c2bbb42e76a113d163c093846da0861ad7 /sbin/dhclient
parentAdd dobeep functions that take messages to buffer.c and cscope.c (diff)
downloadwireguard-openbsd-7fdf91fc462d506a44a895a5aff6964f7e05860f.tar.xz
wireguard-openbsd-7fdf91fc462d506a44a895a5aff6964f7e05860f.zip
Reduce non-debug output further by allowing up to the usual 3 second
grace period of silence before emitting "<if>: no lease...", even if the link has taken a few secocnds to come up. 'link-timoeut' remains the hard deadline for going daemon.
Diffstat (limited to 'sbin/dhclient')
-rw-r--r--sbin/dhclient/dhclient.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 9d5252fd04b..34791632860 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.705 2021/02/27 17:44:58 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.706 2021/02/28 17:33:45 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -2685,8 +2685,11 @@ tick_msg(const char *preamble, int action)
if (printmsg)
fprintf(stderr, "got %s\n", preamble);
preamble_sent = 0;
- if (strcmp("link", preamble) == 0)
+ if (strcmp("link", preamble) == 0) {
linkup = 1;
+ /* New silent period for "no lease ... got lease". */
+ timespecadd(&now, &grace_intvl, &grace);
+ }
break;
case TICK_WAIT:
if (printmsg)