summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2015-10-26 12:24:48 +0000
committertedu <tedu@openbsd.org>2015-10-26 12:24:48 +0000
commit05cd83fdeee79a9ddbbfa34b16d99c4c5b45f45c (patch)
tree133e2625eea5c99bab0b57d2a177be16d6ab9be0
parentset listening sockets to nonblocking, then handle as many incoming requests (diff)
downloadwireguard-openbsd-05cd83fdeee79a9ddbbfa34b16d99c4c5b45f45c.tar.xz
wireguard-openbsd-05cd83fdeee79a9ddbbfa34b16d99c4c5b45f45c.zip
one second amnesty for timeouts so we don't spin with short timeouts
-rw-r--r--usr.sbin/rebound/rebound.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/rebound/rebound.c b/usr.sbin/rebound/rebound.c
index 17e39c5a4aa..e77b9ff88b4 100644
--- a/usr.sbin/rebound/rebound.c
+++ b/usr.sbin/rebound/rebound.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rebound.c,v 1.27 2015/10/26 12:23:40 tedu Exp $ */
+/* $OpenBSD: rebound.c,v 1.28 2015/10/26 12:24:48 tedu Exp $ */
/*
* Copyright (c) 2015 Ted Unangst <tedu@openbsd.org>
*
@@ -496,6 +496,8 @@ launch(const char *confname, int ud, int ld, int kq)
timespecsub(&req->ts, &now, &ts);
timeout = &ts;
}
+ if (timeout)
+ timeout->tv_sec += 1;
}
/* not reached */