summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2021-03-31 21:17:46 +0000
committerkrw <krw@openbsd.org>2021-03-31 21:17:46 +0000
commit9e177caab2b67c448dce9a137f0069446e99e7c4 (patch)
tree4c64b4b22f7ca32ee0c814a8d2ecf76d457d9887 /sbin
parentAdd two missing checks for strdup() returning NULL. (diff)
downloadwireguard-openbsd-9e177caab2b67c448dce9a137f0069446e99e7c4.tar.xz
wireguard-openbsd-9e177caab2b67c448dce9a137f0069446e99e7c4.zip
Set 'select_timeout' to 'now' when an OFFER is received for the IP address
requested in the DISCOVER. i.e. immediately accept the OFFER rather than waiting for select_timeout to expire before accepting the same OFFER. A corner case since select-timeout is 0 by default.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dhclient/dhclient.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 919c6e64eb3..725c03fa11d 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.717 2021/03/31 20:52:09 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.718 2021/03/31 21:17:46 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -923,6 +923,7 @@ process_offer(struct interface_info *ifi, struct option_data *options,
ifi->offer = lease;
free(ifi->offer_src);
ifi->offer_src = strdup(src); /* NULL is OK */
+ ifi->select_timeout = now;
}
if (ifi->offer != lease) {
make_decline(ifi, lease);