bmh10 / rpms / openssh

Forked from rpms/openssh 2 days ago
Clone
d60c81
diff --git a/serverloop.c b/serverloop.c
d60c81
index e16eabe2..a8c99e2e 100644
d60c81
--- a/serverloop.c
d60c81
+++ b/serverloop.c
d60c81
@@ -184,7 +184,8 @@ client_alive_check(struct ssh *ssh)
d60c81
 	int r, channel_id;
d60c81
 
d60c81
 	/* timeout, check to see how many we have had */
d60c81
-	if (ssh_packet_inc_alive_timeouts(ssh) >
d60c81
+	if (options.client_alive_count_max > 0 &&
d60c81
+	    ssh_packet_inc_alive_timeouts(ssh) >
d60c81
 	    options.client_alive_count_max) {
d60c81
 		sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id));
d60c81
 		logit("Timeout, client not responding from %s", remote_id);
d60c81
diff --git a/sshd_config.5 b/sshd_config.5
d60c81
index d47cb0d2..2cddbd59 100644
d60c81
--- a/sshd_config.5
d60c81
+++ b/sshd_config.5
d60c81
@@ -519,6 +519,9 @@ is set to 15, and
d60c81
 .Cm ClientAliveCountMax
d60c81
 is left at the default, unresponsive SSH clients
d60c81
 will be disconnected after approximately 45 seconds.
d60c81
+Setting a zero
d60c81
+.Cm ClientAliveCountMax
d60c81
+disables connection termination.
d60c81
 .It Cm ClientAliveInterval
d60c81
 Sets a timeout interval in seconds after which if no data has been received
d60c81
 from the client,