summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2013-02-19 23:40:25 +0000
committerkrw <krw@openbsd.org>2013-02-19 23:40:25 +0000
commit938c9be1b096b1335d887372376394736cf3752a (patch)
tree2f003fe1743841e3ce11ed68696d0dfebc3a30e6
parentMake it clear that the default implicit 'pass' rule does not create state, (diff)
downloadwireguard-openbsd-938c9be1b096b1335d887372376394736cf3752a.tar.xz
wireguard-openbsd-938c9be1b096b1335d887372376394736cf3752a.zip
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@
-rw-r--r--sbin/dhclient/dhclient.c5
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;