summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient/dispatch.c
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2021-02-27 13:59:00 +0000
committerkrw <krw@openbsd.org>2021-02-27 13:59:00 +0000
commit30a3e6e1710f28fd7510fcc44bd86bc47d29646a (patch)
treef0111d443893f5a7b1c67e68a5dd0fa1b131a50a /sbin/dhclient/dispatch.c
parentReplace stray direct call of f_event with filter_event(). (diff)
downloadwireguard-openbsd-30a3e6e1710f28fd7510fcc44bd86bc47d29646a.tar.xz
wireguard-openbsd-30a3e6e1710f28fd7510fcc44bd86bc47d29646a.zip
Disentangle log_debug() output from tick_msg() output.
Simplifies -v output, and reduces non-'-v' output. Reduce non-'-v' output further by only displaying the first 'link up' event. Restore behaviour specified in dhclient.conf(5) of going daemon after link-timeout seconds, rather than waiting another link-timeout seconds for a lease to be accepted. Lease verbiage problem reported, and fix tested by Mihai Popescu. Thanks! Link verbiage problems reported, fix tested & ok tb@.
Diffstat (limited to 'sbin/dhclient/dispatch.c')
-rw-r--r--sbin/dhclient/dispatch.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c
index 774e7acd81e..1e6a570f90a 100644
--- a/sbin/dhclient/dispatch.c
+++ b/sbin/dhclient/dispatch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dispatch.c,v 1.168 2021/02/19 13:33:37 krw Exp $ */
+/* $OpenBSD: dispatch.c,v 1.169 2021/02/27 13:59:00 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -89,6 +89,9 @@ dispatch(struct interface_info *ifi, int routefd)
void (*func)(struct interface_info *);
int nfds;
+ log_debug("%s: link is %s", log_procname,
+ LINK_STATE_IS_UP(ifi->link_state) ? "up" : "down");
+
while (quit == 0 || quit == RESTART) {
if (quit == RESTART) {
quit = 0;