diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-03-27 09:29:14 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-03-27 20:30:58 +1100 |
commit | 21da87f439b48a85b951ef1518fe85ac0273e719 (patch) | |
tree | 9d15688d230cae04591214aef4f275c7840806a2 /serverloop.c | |
parent | 4f0019a9afdb4a94d83b75e82dbbbe0cbe826c56 (diff) |
upstream: fix interaction between ClientAliveInterval and RekeyLimit
that could cause connection to close incorrectly; Report and patch from Jakub
Jelen in bz#2757; ok dtucker@ markus@
OpenBSD-Commit-ID: 17229a8a65bd8e6c2080318ec2b7a61e1aede3fb
Diffstat (limited to 'serverloop.c')
-rw-r--r-- | serverloop.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/serverloop.c b/serverloop.c index f86f832b6..d7b04b37c 100644 --- a/serverloop.c +++ b/serverloop.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: serverloop.c,v 1.214 2019/03/06 21:06:59 dtucker Exp $ */ | 1 | /* $OpenBSD: serverloop.c,v 1.215 2019/03/27 09:29:14 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -248,9 +248,10 @@ wait_until_can_do_something(struct ssh *ssh, | |||
248 | uint64_t keepalive_ms = | 248 | uint64_t keepalive_ms = |
249 | (uint64_t)options.client_alive_interval * 1000; | 249 | (uint64_t)options.client_alive_interval * 1000; |
250 | 250 | ||
251 | client_alive_scheduled = 1; | 251 | if (max_time_ms == 0 || max_time_ms > keepalive_ms) { |
252 | if (max_time_ms == 0 || max_time_ms > keepalive_ms) | ||
253 | max_time_ms = keepalive_ms; | 252 | max_time_ms = keepalive_ms; |
253 | client_alive_scheduled = 1; | ||
254 | } | ||
254 | } | 255 | } |
255 | 256 | ||
256 | #if 0 | 257 | #if 0 |