]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: fix interaction between ClientAliveInterval and RekeyLimit
authordjm@openbsd.org <djm@openbsd.org>
Wed, 27 Mar 2019 09:29:14 +0000 (09:29 +0000)
committerDamien Miller <djm@mindrot.org>
Wed, 27 Mar 2019 09:30:58 +0000 (20:30 +1100)
that could cause connection to close incorrectly; Report and patch from Jakub
Jelen in bz#2757; ok dtucker@ markus@

OpenBSD-Commit-ID: 17229a8a65bd8e6c2080318ec2b7a61e1aede3fb

serverloop.c

index f86f832b6f8af6bd691429cd31002acce896b4ee..d7b04b37c6962967ac46fb71babd214b1c6af41c 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: serverloop.c,v 1.214 2019/03/06 21:06:59 dtucker Exp $ */
+/* $OpenBSD: serverloop.c,v 1.215 2019/03/27 09:29:14 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -248,9 +248,10 @@ wait_until_can_do_something(struct ssh *ssh,
                uint64_t keepalive_ms =
                    (uint64_t)options.client_alive_interval * 1000;
 
-               client_alive_scheduled = 1;
-               if (max_time_ms == 0 || max_time_ms > keepalive_ms)
+               if (max_time_ms == 0 || max_time_ms > keepalive_ms) {
                        max_time_ms = keepalive_ms;
+                       client_alive_scheduled = 1;
+               }
        }
 
 #if 0