From 336ba163d3caf8044c83e2651be02ad96fa0c919 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Wed, 24 Jan 2018 19:12:50 +0000 Subject: Don't display the seconds until renewal. i.e. "em0: bound to 1.2.3.4 -- renewal in 300000 seconds" becomes simply "em0: bound to 1.2.3.4" While here avoid setting timeouts before the current time. ok florian@ --- sbin/dhclient/dispatch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sbin/dhclient/dispatch.c') diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c index f5916c9be55..ef3005baf92 100644 --- a/sbin/dhclient/dispatch.c +++ b/sbin/dhclient/dispatch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dispatch.c,v 1.146 2017/09/20 22:05:10 krw Exp $ */ +/* $OpenBSD: dispatch.c,v 1.147 2018/01/24 19:12:49 krw Exp $ */ /* * Copyright 2004 Henning Brauer @@ -325,7 +325,8 @@ set_timeout(struct interface_info *ifi, time_t secs, void (*where)(struct interface_info *)) { time(&ifi->timeout); - ifi->timeout += secs; + if (secs > 0) + ifi->timeout += secs; ifi->timeout_func = where; } -- cgit v1.2.3