diff options
-rw-r--r-- | clientloop.c | 19 | ||||
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | ssh_config.5 | 7 |
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) | |||
324 | static void | 324 | static void |
325 | server_alive_check(void) | 325 | server_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, | |||
570 | or 300 if the | 570 | or 300 if the |
571 | .Cm BatchMode | 571 | .Cm BatchMode |
572 | option is set. | 572 | option is set. |
573 | This option applies to protocol version 2 only. | 573 | .Cm ProtocolKeepAlives |
574 | is a Debian-specific compatibility alias for this option. | ||
574 | .It Cm ServerAliveCountMax | 575 | .It Cm ServerAliveCountMax |
575 | Sets the number of server alive messages (see above) which may be | 576 | Sets the number of server alive messages (see above) which may be |
576 | sent without | 577 | sent without |
@@ -598,6 +599,10 @@ If, for example, | |||
598 | .Cm ServerAliveCountMax | 599 | .Cm ServerAliveCountMax |
599 | is left at the default, if the server becomes unresponsive ssh | 600 | is left at the default, if the server becomes unresponsive ssh |
600 | will disconnect after approximately 45 seconds. | 601 | will disconnect after approximately 45 seconds. |
602 | This option works when using protocol version 2 only; in protocol version | ||
603 | 1 there is no mechanism to request a response from the server to the | ||
604 | server alive messages, so disconnection is the responsibility of the TCP | ||
605 | stack. | ||
601 | .It Cm SetupTimeOut | 606 | .It Cm SetupTimeOut |
602 | Normally, | 607 | Normally, |
603 | .Nm ssh | 608 | .Nm ssh |