diff options
Diffstat (limited to 'debian/patches/ssh1-keepalive.patch')
-rw-r--r-- | debian/patches/ssh1-keepalive.patch | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/debian/patches/ssh1-keepalive.patch b/debian/patches/ssh1-keepalive.patch index c82563033..ccd9a668e 100644 --- a/debian/patches/ssh1-keepalive.patch +++ b/debian/patches/ssh1-keepalive.patch | |||
@@ -7,13 +7,20 @@ Index: b/clientloop.c | |||
7 | =================================================================== | 7 | =================================================================== |
8 | --- a/clientloop.c | 8 | --- a/clientloop.c |
9 | +++ b/clientloop.c | 9 | +++ b/clientloop.c |
10 | @@ -502,16 +502,21 @@ | 10 | @@ -507,16 +507,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); | ||
17 | + if (compat20) { | 24 | + if (compat20) { |
18 | + if (packet_inc_alive_timeouts() > options.server_alive_count_max) { | 25 | + if (packet_inc_alive_timeouts() > options.server_alive_count_max) { |
19 | + logit("Timeout, server not responding."); | 26 | + logit("Timeout, server not responding."); |
@@ -28,17 +35,11 @@ Index: b/clientloop.c | |||
28 | + } else { | 35 | + } else { |
29 | + packet_send_ignore(0); | 36 | + packet_send_ignore(0); |
30 | + packet_send(); | 37 | + packet_send(); |
31 | } | 38 | + } |
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); | ||
38 | } | 39 | } |
39 | 40 | ||
40 | /* | 41 | /* |
41 | @@ -572,7 +577,7 @@ | 42 | @@ -574,7 +579,7 @@ |
42 | * event pending. | 43 | * event pending. |
43 | */ | 44 | */ |
44 | 45 | ||
@@ -51,7 +52,7 @@ Index: b/ssh_config.5 | |||
51 | =================================================================== | 52 | =================================================================== |
52 | --- a/ssh_config.5 | 53 | --- a/ssh_config.5 |
53 | +++ b/ssh_config.5 | 54 | +++ b/ssh_config.5 |
54 | @@ -935,7 +935,10 @@ | 55 | @@ -956,7 +956,10 @@ |
55 | .Cm ServerAliveCountMax | 56 | .Cm ServerAliveCountMax |
56 | is left at the default, if the server becomes unresponsive, | 57 | is left at the default, if the server becomes unresponsive, |
57 | ssh will disconnect after approximately 45 seconds. | 58 | ssh will disconnect after approximately 45 seconds. |