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>2014-02-10 02:40:15 +0000
commit043f937820e1152df2c8416f37e6c8d923fc1811 (patch)
tree99b263192c6e897f9365f653acdcd65d6283791d /readconf.c
parent9f42d3b964854aecfed2fff64ac375c0c4805fa5 (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: 2013-09-14 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 2a1fe8ec6..e79e355dc 100644
--- a/readconf.c
+++ b/readconf.c
@@ -150,6 +150,7 @@ typedef enum {
150 oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown, oProxyUseFdpass, 150 oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown, oProxyUseFdpass,
151 oCanonicalDomains, oCanonicalizeHostname, oCanonicalizeMaxDots, 151 oCanonicalDomains, oCanonicalizeHostname, oCanonicalizeMaxDots,
152 oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs, 152 oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs,
153 oProtocolKeepAlives, oSetupTimeOut,
153 oIgnoredUnknownOption, oDeprecated, oUnsupported 154 oIgnoredUnknownOption, oDeprecated, oUnsupported
154} OpCodes; 155} OpCodes;
155 156
@@ -279,6 +280,8 @@ static struct {
279 { "canonicalizemaxdots", oCanonicalizeMaxDots }, 280 { "canonicalizemaxdots", oCanonicalizeMaxDots },
280 { "canonicalizepermittedcnames", oCanonicalizePermittedCNAMEs }, 281 { "canonicalizepermittedcnames", oCanonicalizePermittedCNAMEs },
281 { "ignoreunknown", oIgnoreUnknown }, 282 { "ignoreunknown", oIgnoreUnknown },
283 { "protocolkeepalives", oProtocolKeepAlives },
284 { "setuptimeout", oSetupTimeOut },
282 285
283 { NULL, oBadOption } 286 { NULL, oBadOption }
284}; 287};
@@ -1245,6 +1248,8 @@ parse_int:
1245 goto parse_flag; 1248 goto parse_flag;
1246 1249
1247 case oServerAliveInterval: 1250 case oServerAliveInterval:
1251 case oProtocolKeepAlives: /* Debian-specific compatibility alias */
1252 case oSetupTimeOut: /* Debian-specific compatibility alias */
1248 intptr = &options->server_alive_interval; 1253 intptr = &options->server_alive_interval;
1249 goto parse_time; 1254 goto parse_time;
1250 1255
@@ -1724,8 +1729,13 @@ fill_default_options(Options * options)
1724 options->rekey_interval = 0; 1729 options->rekey_interval = 0;
1725 if (options->verify_host_key_dns == -1) 1730 if (options->verify_host_key_dns == -1)
1726 options->verify_host_key_dns = 0; 1731 options->verify_host_key_dns = 0;
1727 if (options->server_alive_interval == -1) 1732 if (options->server_alive_interval == -1) {
1728 options->server_alive_interval = 0; 1733 /* in batch mode, default is 5mins */
1734 if (options->batch_mode == 1)
1735 options->server_alive_interval = 300;
1736 else
1737 options->server_alive_interval = 0;
1738 }
1729 if (options->server_alive_count_max == -1) 1739 if (options->server_alive_count_max == -1)
1730 options->server_alive_count_max = 3; 1740 options->server_alive_count_max = 3;
1731 if (options->control_master == -1) 1741 if (options->control_master == -1)