summaryrefslogtreecommitdiffstats
path: root/serverloop.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2020-01-25 23:41:01 +0100
committerDamien Miller <djm@mindrot.org>2020-01-26 00:15:13 +0100
commit69334996ae203c51c70bf01d414c918a44618f8e (patch)
tree49c989200f7fe21406efa34ed341601079a75d25 /serverloop.c
parentupstream: clarify order of AllowUsers/DenyUsers vs (diff)
downloadopenssh-69334996ae203c51c70bf01d414c918a44618f8e.tar.xz
openssh-69334996ae203c51c70bf01d414c918a44618f8e.zip
upstream: make sshd_config:ClientAliveCountMax=0 disable the
connection killing behaviour, rather than killing the connection after sending the first liveness test probe (regardless of whether the client was responsive) bz2627; ok markus OpenBSD-Commit-ID: 5af79c35f4c9fa280643b6852f524bfcd9bccdaf
Diffstat (limited to 'serverloop.c')
-rw-r--r--serverloop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/serverloop.c b/serverloop.c
index e16eabe27..a8c99e2e0 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: serverloop.c,v 1.220 2020/01/25 04:48:26 djm Exp $ */
+/* $OpenBSD: serverloop.c,v 1.221 2020/01/25 22:41:01 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -184,7 +184,8 @@ client_alive_check(struct ssh *ssh)
int r, channel_id;
/* timeout, check to see how many we have had */
- if (ssh_packet_inc_alive_timeouts(ssh) >
+ if (options.client_alive_count_max > 0 &&
+ ssh_packet_inc_alive_timeouts(ssh) >
options.client_alive_count_max) {
sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id));
logit("Timeout, client not responding from %s", remote_id);