summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
authorRichard Kettlewell <rjk@greenend.org.uk>2014-02-09 16:09:52 +0000
committerColin Watson <cjwatson@debian.org>2017-01-16 15:02:53 +0000
commit9078d9722d24a42b8f86621d20a6a6b42ba18d37 (patch)
tree643f99b191240b82cc1987e4d66da88916a44f76 /readconf.c
parentffecece153b7caedf997dccf17747633675631fd (diff)
Various keepalive extensions
Add compatibility aliases for ProtocolKeepAlives and SetupTimeOut, supported in previous versions of Debian's OpenSSH package but since superseded by ServerAliveInterval. (We're probably stuck with this bit for compatibility.) In batch mode, default ServerAliveInterval to five minutes. Adjust documentation to match and to give some more advice on use of keepalives. Author: Ian Jackson <ian@chiark.greenend.org.uk> Author: Matthew Vernon <matthew@debian.org> Author: Colin Watson <cjwatson@debian.org> Last-Update: 2016-12-26 Patch-Name: keepalive-extensions.patch
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/readconf.c b/readconf.c
index c1c3aae0d..3efba242f 100644
--- a/readconf.c
+++ b/readconf.c
@@ -173,6 +173,7 @@ typedef enum {
173 oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, 173 oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys,
174 oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, 174 oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes,
175 oPubkeyAcceptedKeyTypes, oProxyJump, 175 oPubkeyAcceptedKeyTypes, oProxyJump,
176 oProtocolKeepAlives, oSetupTimeOut,
176 oIgnoredUnknownOption, oDeprecated, oUnsupported 177 oIgnoredUnknownOption, oDeprecated, oUnsupported
177} OpCodes; 178} OpCodes;
178 179
@@ -308,6 +309,8 @@ static struct {
308 { "pubkeyacceptedkeytypes", oPubkeyAcceptedKeyTypes }, 309 { "pubkeyacceptedkeytypes", oPubkeyAcceptedKeyTypes },
309 { "ignoreunknown", oIgnoreUnknown }, 310 { "ignoreunknown", oIgnoreUnknown },
310 { "proxyjump", oProxyJump }, 311 { "proxyjump", oProxyJump },
312 { "protocolkeepalives", oProtocolKeepAlives },
313 { "setuptimeout", oSetupTimeOut },
311 314
312 { NULL, oBadOption } 315 { NULL, oBadOption }
313}; 316};
@@ -1402,6 +1405,8 @@ parse_keytypes:
1402 goto parse_flag; 1405 goto parse_flag;
1403 1406
1404 case oServerAliveInterval: 1407 case oServerAliveInterval:
1408 case oProtocolKeepAlives: /* Debian-specific compatibility alias */
1409 case oSetupTimeOut: /* Debian-specific compatibility alias */
1405 intptr = &options->server_alive_interval; 1410 intptr = &options->server_alive_interval;
1406 goto parse_time; 1411 goto parse_time;
1407 1412
@@ -2047,8 +2052,13 @@ fill_default_options(Options * options)
2047 options->rekey_interval = 0; 2052 options->rekey_interval = 0;
2048 if (options->verify_host_key_dns == -1) 2053 if (options->verify_host_key_dns == -1)
2049 options->verify_host_key_dns = 0; 2054 options->verify_host_key_dns = 0;
2050 if (options->server_alive_interval == -1) 2055 if (options->server_alive_interval == -1) {
2051 options->server_alive_interval = 0; 2056 /* in batch mode, default is 5mins */
2057 if (options->batch_mode == 1)
2058 options->server_alive_interval = 300;
2059 else
2060 options->server_alive_interval = 0;
2061 }
2052 if (options->server_alive_count_max == -1) 2062 if (options->server_alive_count_max == -1)
2053 options->server_alive_count_max = 3; 2063 options->server_alive_count_max = 3;
2054 if (options->control_master == -1) 2064 if (options->control_master == -1)