diff options
author | 2020-07-03 06:29:57 +0000 | |
---|---|---|
committer | 2020-07-03 06:29:57 +0000 | |
commit | f9b867c0c91055a7740240aee9a6f7ebec8a4093 (patch) | |
tree | d744cfcf6846848b93d96ca2c25504410b8cf5f9 /usr.bin/ssh/serverloop.c | |
parent | Only reset the serveralive check when we receive traffic from the server (diff) | |
download | wireguard-openbsd-f9b867c0c91055a7740240aee9a6f7ebec8a4093.tar.xz wireguard-openbsd-f9b867c0c91055a7740240aee9a6f7ebec8a4093.zip |
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/ssh/serverloop.c')
-rw-r--r-- | usr.bin/ssh/serverloop.c | 4 |
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 |