diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2015-11-12 18:46:15 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2015-11-12 18:46:15 +0000 |
commit | d7ee32551043146ed52094b9bb6cc6d75e7e7944 (patch) | |
tree | cf67eecfd65e3a1f526d2cf06177c3ed6463beef /sbin/dhclient | |
parent | d6357bba34c972bd6b953f3d54020ae4bde4081e (diff) |
When link loss is reported, cancel any active timeout and wait for
link to return.
Inadvertantly broken in r1.308.
Problem noted by tedu@
Diffstat (limited to 'sbin/dhclient')
-rw-r--r-- | sbin/dhclient/dhclient.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 8c97f1c859e..9e728550cc7 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.365 2015/10/26 16:32:33 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.366 2015/11/12 18:46:14 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -356,9 +356,10 @@ routehandler(void) client->state = S_REBOOTING; state_reboot(); } - } else if (strlen(path_option_db)) { + } else { /* Let monitoring programs see link loss. */ - write_option_db("", 0); + if (strlen(path_option_db)) + write_option_db("", 0); /* No need to wait for anything but link. */ cancel_timeout(); } |