summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2020-07-03 06:29:58 +0000
committerDamien Miller <djm@cvs.openbsd.org>2020-07-03 06:29:58 +0000
commit21cffd728ed60e74cfc5dac7f6486109c5427c7d (patch)
tree024686ac9c9a12c83327a51d855b81bc4ca294ff /usr.bin
parent7a557e63b2e42be6f31acbe02ea467260614b1c7 (diff)
start ClientAliveInterval bookkeeping before first pass through
select() loop; fixed theoretical case where busy sshd may ignore timeouts from client; inspired by and ok dtucker
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/serverloop.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/ssh/serverloop.c b/usr.bin/ssh/serverloop.c
index 71f3169e90c..ed83bfcd03d 100644
--- a/usr.bin/ssh/serverloop.c
+++ b/usr.bin/ssh/serverloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: serverloop.c,v 1.222 2020/01/30 07:21:38 djm Exp $ */
+/* $OpenBSD: serverloop.c,v 1.223 2020/07/03 06:29:57 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -249,6 +249,8 @@ wait_until_can_do_something(struct ssh *ssh,
max_time_ms = keepalive_ms;
client_alive_scheduled = 1;
}
+ if (last_client_time == 0)
+ last_client_time = monotime();
}
#if 0