]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: start ClientAliveInterval bookkeeping before first pass
authordjm@openbsd.org <djm@openbsd.org>
Fri, 3 Jul 2020 06:29:57 +0000 (06:29 +0000)
committerDamien Miller <djm@mindrot.org>
Fri, 3 Jul 2020 07:03:53 +0000 (17:03 +1000)
through select() loop; fixed theoretical case where busy sshd may ignore
timeouts from client; inspired by and ok dtucker

OpenBSD-Commit-ID: 96bfc4b1f86c7da313882a84755b2b47eb31957f

serverloop.c

index 340b19a5a48af028c6c06c14cbb5ae0aa9bdf68d..48d936d2e39560197c14f6688255e10c1aec77d6 100644 (file)
@@ -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
@@ -253,6 +253,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