summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--clientloop.c19
-rw-r--r--debian/changelog2
-rw-r--r--ssh_config.57
3 files changed, 20 insertions, 8 deletions
diff --git a/clientloop.c b/clientloop.c
index 626b29a5a..a13d06ddf 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -324,12 +324,17 @@ client_global_request_reply(int type, u_int32_t seq, void *ctxt)
324static void 324static void
325server_alive_check(void) 325server_alive_check(void)
326{ 326{
327 if (++server_alive_timeouts > options.server_alive_count_max) 327 if (compat20) {
328 packet_disconnect("Timeout, server not responding."); 328 if (++server_alive_timeouts > options.server_alive_count_max)
329 packet_start(SSH2_MSG_GLOBAL_REQUEST); 329 packet_disconnect("Timeout, server not responding.");
330 packet_put_cstring("keepalive@openssh.com"); 330 packet_start(SSH2_MSG_GLOBAL_REQUEST);
331 packet_put_char(1); /* boolean: want reply */ 331 packet_put_cstring("keepalive@openssh.com");
332 packet_send(); 332 packet_put_char(1); /* boolean: want reply */
333 packet_send();
334 } else {
335 packet_send_ignore(0);
336 packet_send();
337 }
333} 338}
334 339
335/* 340/*
@@ -388,7 +393,7 @@ client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp,
388 * event pending. 393 * event pending.
389 */ 394 */
390 395
391 if (options.server_alive_interval == 0 || !compat20) 396 if (options.server_alive_interval == 0)
392 tvp = NULL; 397 tvp = NULL;
393 else { 398 else {
394 tv.tv_sec = options.server_alive_interval; 399 tv.tv_sec = options.server_alive_interval;
diff --git a/debian/changelog b/debian/changelog
index 5a05d0f3e..2bb0f227a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,8 @@ openssh (1:3.8p1-1) UNRELEASED; urgency=low
19 * ServerAliveInterval implemented upstream, so ProtocolKeepAlives is now a 19 * ServerAliveInterval implemented upstream, so ProtocolKeepAlives is now a
20 compatibility alias. The semantics differ slightly, though; see 20 compatibility alias. The semantics differ slightly, though; see
21 ssh_config(5) for details. 21 ssh_config(5) for details.
22 * Implement SSH1 support for ServerAliveInterval using SSH_MSG_IGNORE. As
23 documented in ssh_config(5), it's not as good as the SSH2 version.
22 * Remove -fno-builtin-log, -DHAVE_MMAP_ANON_SHARED, and 24 * Remove -fno-builtin-log, -DHAVE_MMAP_ANON_SHARED, and
23 -D__FILE_OFFSET_BITS=64 compiler options, which are no longer necessary. 25 -D__FILE_OFFSET_BITS=64 compiler options, which are no longer necessary.
24 * Update config.guess and config.sub from autotools-dev 20040105.1. 26 * Update config.guess and config.sub from autotools-dev 20040105.1.
diff --git a/ssh_config.5 b/ssh_config.5
index 25485f3da..72ad6d512 100644
--- a/ssh_config.5
+++ b/ssh_config.5
@@ -570,7 +570,8 @@ is 0, indicating that these messages will not be sent to the server,
570or 300 if the 570or 300 if the
571.Cm BatchMode 571.Cm BatchMode
572option is set. 572option is set.
573This option applies to protocol version 2 only. 573.Cm ProtocolKeepAlives
574is a Debian-specific compatibility alias for this option.
574.It Cm ServerAliveCountMax 575.It Cm ServerAliveCountMax
575Sets the number of server alive messages (see above) which may be 576Sets the number of server alive messages (see above) which may be
576sent without 577sent without
@@ -598,6 +599,10 @@ If, for example,
598.Cm ServerAliveCountMax 599.Cm ServerAliveCountMax
599is left at the default, if the server becomes unresponsive ssh 600is left at the default, if the server becomes unresponsive ssh
600will disconnect after approximately 45 seconds. 601will disconnect after approximately 45 seconds.
602This option works when using protocol version 2 only; in protocol version
6031 there is no mechanism to request a response from the server to the
604server alive messages, so disconnection is the responsibility of the TCP
605stack.
601.It Cm SetupTimeOut 606.It Cm SetupTimeOut
602Normally, 607Normally,
603.Nm ssh 608.Nm ssh