From: krw Date: Fri, 9 Feb 2018 23:23:02 +0000 (+0000) Subject: If there is no link after link_timeout seconds don't forget X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a7c8c47230b0faccff510cd8b3ca81528d63563f;p=openbsd If there is no link after link_timeout seconds don't forget to go_daemon() while waiting for the RTM_IFINFO message. Problem spotted by Holger Mikolon. --- diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index d5c3ad5197f..7f176211630 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.561 2018/02/08 08:22:31 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.562 2018/02/09 23:23:02 krw Exp $ */ /* * Copyright 2004 Henning Brauer @@ -707,9 +707,10 @@ state_preboot(struct interface_info *ifi) state_reboot(ifi); } else { tick_msg("link", 0, tickstart, tickstop); - if (cur_time > tickstop) + if (cur_time > tickstop) { + go_daemon(); cancel_timeout(ifi); /* Wait for RTM_IFINFO. */ - else + } else set_timeout(ifi, 1, state_preboot); } }