diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2013-02-19 23:40:26 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2013-02-19 23:40:26 +0000 |
commit | 9788adabf71ef7ff5759f63fb18423993ab0d19b (patch) | |
tree | 43cf4789c105b93cc9b4246ba696fe579ba5ecba /sbin/dhclient/dhclient.c | |
parent | 81bed563981b6618909b47a4dae2a85cecadbb67 (diff) |
Cancel any outstanding protocol timeout when a link goes away. When
the link comes back we will start from scratch with DISCOVER. Stops
pointless attempts to issue packets over a disconnected interface.
Noticed by deraadt@
Diffstat (limited to 'sbin/dhclient/dhclient.c')
-rw-r--r-- | sbin/dhclient/dhclient.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 91d55d1d49b..d6f0835cc11 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.237 2013/02/18 15:57:08 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.238 2013/02/19 23:40:25 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -288,6 +288,9 @@ routehandler(void) if (ifi->linkstat) { client->state = S_REBOOTING; state_reboot(); + } else { + /* No need to wait for anything but link. */ + cancel_timeout(); } } break; |