summaryrefslogtreecommitdiff
path: root/debian/patches/ssh1-keepalive.patch
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2010-02-27 14:05:10 +0000
committerColin Watson <cjwatson@debian.org>2010-02-27 14:05:10 +0000
commit8dcc7c5ef45cf5032dca7a308ffe17d3935e62d5 (patch)
tree2e0d8058bdfc24a60a20c5bcbfd1075ef1048ff3 /debian/patches/ssh1-keepalive.patch
parente44a1fb6e8e59e67e5c8b6e83c0d8566d146aad9 (diff)
Convert to source format 3.0 (quilt).
Diffstat (limited to 'debian/patches/ssh1-keepalive.patch')
-rw-r--r--debian/patches/ssh1-keepalive.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/debian/patches/ssh1-keepalive.patch b/debian/patches/ssh1-keepalive.patch
new file mode 100644
index 000000000..37b8052eb
--- /dev/null
+++ b/debian/patches/ssh1-keepalive.patch
@@ -0,0 +1,60 @@
1Index: b/clientloop.c
2===================================================================
3--- a/clientloop.c
4+++ b/clientloop.c
5@@ -502,16 +502,21 @@
6 static void
7 server_alive_check(void)
8 {
9- if (packet_inc_alive_timeouts() > options.server_alive_count_max) {
10- logit("Timeout, server not responding.");
11- cleanup_exit(255);
12+ if (compat20) {
13+ if (packet_inc_alive_timeouts() > options.server_alive_count_max) {
14+ logit("Timeout, server not responding.");
15+ cleanup_exit(255);
16+ }
17+ packet_start(SSH2_MSG_GLOBAL_REQUEST);
18+ packet_put_cstring("keepalive@openssh.com");
19+ packet_put_char(1); /* boolean: want reply */
20+ packet_send();
21+ /* Insert an empty placeholder to maintain ordering */
22+ client_register_global_confirm(NULL, NULL);
23+ } else {
24+ packet_send_ignore(0);
25+ packet_send();
26 }
27- packet_start(SSH2_MSG_GLOBAL_REQUEST);
28- packet_put_cstring("keepalive@openssh.com");
29- packet_put_char(1); /* boolean: want reply */
30- packet_send();
31- /* Insert an empty placeholder to maintain ordering */
32- client_register_global_confirm(NULL, NULL);
33 }
34
35 /*
36@@ -572,7 +577,7 @@
37 * event pending.
38 */
39
40- if (options.server_alive_interval == 0 || !compat20)
41+ if (options.server_alive_interval == 0)
42 tvp = NULL;
43 else {
44 tv.tv_sec = options.server_alive_interval;
45Index: b/ssh_config.5
46===================================================================
47--- a/ssh_config.5
48+++ b/ssh_config.5
49@@ -935,7 +935,10 @@
50 .Cm ServerAliveCountMax
51 is left at the default, if the server becomes unresponsive,
52 ssh will disconnect after approximately 45 seconds.
53-This option applies to protocol version 2 only.
54+This option applies to protocol version 2 only; in protocol version
55+1 there is no mechanism to request a response from the server to the
56+server alive messages, so disconnection is the responsibility of the TCP
57+stack.
58 .It Cm ServerAliveInterval
59 Sets a timeout interval in seconds after which if no data has been received
60 from the server,