summaryrefslogtreecommitdiff
path: root/debian/patches/ssh1-keepalive.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/ssh1-keepalive.patch')
-rw-r--r--debian/patches/ssh1-keepalive.patch33
1 files changed, 16 insertions, 17 deletions
diff --git a/debian/patches/ssh1-keepalive.patch b/debian/patches/ssh1-keepalive.patch
index 7682c0761..dac1ca1cc 100644
--- a/debian/patches/ssh1-keepalive.patch
+++ b/debian/patches/ssh1-keepalive.patch
@@ -7,20 +7,13 @@ Index: b/clientloop.c
7=================================================================== 7===================================================================
8--- a/clientloop.c 8--- a/clientloop.c
9+++ b/clientloop.c 9+++ b/clientloop.c
10@@ -507,16 +507,21 @@ 10@@ -547,16 +547,21 @@
11 static void 11 static void
12 server_alive_check(void) 12 server_alive_check(void)
13 { 13 {
14- if (packet_inc_alive_timeouts() > options.server_alive_count_max) { 14- if (packet_inc_alive_timeouts() > options.server_alive_count_max) {
15- logit("Timeout, server not responding."); 15- logit("Timeout, server not responding.");
16- cleanup_exit(255); 16- cleanup_exit(255);
17- }
18- packet_start(SSH2_MSG_GLOBAL_REQUEST);
19- packet_put_cstring("keepalive@openssh.com");
20- packet_put_char(1); /* boolean: want reply */
21- packet_send();
22- /* Insert an empty placeholder to maintain ordering */
23- client_register_global_confirm(NULL, NULL);
24+ if (compat20) { 17+ if (compat20) {
25+ if (packet_inc_alive_timeouts() > options.server_alive_count_max) { 18+ if (packet_inc_alive_timeouts() > options.server_alive_count_max) {
26+ logit("Timeout, server not responding."); 19+ logit("Timeout, server not responding.");
@@ -35,24 +28,30 @@ Index: b/clientloop.c
35+ } else { 28+ } else {
36+ packet_send_ignore(0); 29+ packet_send_ignore(0);
37+ packet_send(); 30+ packet_send();
38+ } 31 }
32- packet_start(SSH2_MSG_GLOBAL_REQUEST);
33- packet_put_cstring("keepalive@openssh.com");
34- packet_put_char(1); /* boolean: want reply */
35- packet_send();
36- /* Insert an empty placeholder to maintain ordering */
37- client_register_global_confirm(NULL, NULL);
39 } 38 }
40 39
41 /* 40 /*
42@@ -574,7 +579,7 @@ 41@@ -616,7 +621,7 @@
43 * event pending.
44 */ 42 */
45 43
46- if (options.server_alive_interval == 0 || !compat20) 44 timeout_secs = INT_MAX; /* we use INT_MAX to mean no timeout */
47+ if (options.server_alive_interval == 0) 45- if (options.server_alive_interval > 0 && compat20)
48 tvp = NULL; 46+ if (options.server_alive_interval > 0)
49 else { 47 timeout_secs = options.server_alive_interval;
50 tv.tv_sec = options.server_alive_interval; 48 set_control_persist_exit_time();
49 if (control_persist_exit_time > 0) {
51Index: b/ssh_config.5 50Index: b/ssh_config.5
52=================================================================== 51===================================================================
53--- a/ssh_config.5 52--- a/ssh_config.5
54+++ b/ssh_config.5 53+++ b/ssh_config.5
55@@ -952,7 +952,10 @@ 54@@ -983,7 +983,10 @@
56 .Cm ServerAliveCountMax 55 .Cm ServerAliveCountMax
57 is left at the default, if the server becomes unresponsive, 56 is left at the default, if the server becomes unresponsive,
58 ssh will disconnect after approximately 45 seconds. 57 ssh will disconnect after approximately 45 seconds.