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-03-20 00:24:49 +0000
commit81540b7886fdc73c7be304706ea33d6d87b5fc81 (patch)
tree80ff174ba82d2546c55732b17253eb7c74a6f18d /readconf.c
parent789d58ed3df120c7b80d07fb2d259c216194a29c (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 bcd8cad18..640993732 100644
--- a/readconf.c
+++ b/readconf.c
@@ -151,6 +151,7 @@ typedef enum {
151 oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown, oProxyUseFdpass, 151 oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown, oProxyUseFdpass,
152 oCanonicalDomains, oCanonicalizeHostname, oCanonicalizeMaxDots, 152 oCanonicalDomains, oCanonicalizeHostname, oCanonicalizeMaxDots,
153 oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs, 153 oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs,
154 oProtocolKeepAlives, oSetupTimeOut,
154 oIgnoredUnknownOption, oDeprecated, oUnsupported 155 oIgnoredUnknownOption, oDeprecated, oUnsupported
155} OpCodes; 156} OpCodes;
156 157
@@ -274,6 +275,8 @@ static struct {
274 { "canonicalizemaxdots", oCanonicalizeMaxDots }, 275 { "canonicalizemaxdots", oCanonicalizeMaxDots },
275 { "canonicalizepermittedcnames", oCanonicalizePermittedCNAMEs }, 276 { "canonicalizepermittedcnames", oCanonicalizePermittedCNAMEs },
276 { "ignoreunknown", oIgnoreUnknown }, 277 { "ignoreunknown", oIgnoreUnknown },
278 { "protocolkeepalives", oProtocolKeepAlives },
279 { "setuptimeout", oSetupTimeOut },
277 280
278 { NULL, oBadOption } 281 { NULL, oBadOption }
279}; 282};
@@ -1247,6 +1250,8 @@ parse_int:
1247 goto parse_flag; 1250 goto parse_flag;
1248 1251
1249 case oServerAliveInterval: 1252 case oServerAliveInterval:
1253 case oProtocolKeepAlives: /* Debian-specific compatibility alias */
1254 case oSetupTimeOut: /* Debian-specific compatibility alias */
1250 intptr = &options->server_alive_interval; 1255 intptr = &options->server_alive_interval;
1251 goto parse_time; 1256 goto parse_time;
1252 1257
@@ -1746,8 +1751,13 @@ fill_default_options(Options * options)
1746 options->rekey_interval = 0; 1751 options->rekey_interval = 0;
1747 if (options->verify_host_key_dns == -1) 1752 if (options->verify_host_key_dns == -1)
1748 options->verify_host_key_dns = 0; 1753 options->verify_host_key_dns = 0;
1749 if (options->server_alive_interval == -1) 1754 if (options->server_alive_interval == -1) {
1750 options->server_alive_interval = 0; 1755 /* in batch mode, default is 5mins */
1756 if (options->batch_mode == 1)
1757 options->server_alive_interval = 300;
1758 else
1759 options->server_alive_interval = 0;
1760 }
1751 if (options->server_alive_count_max == -1) 1761 if (options->server_alive_count_max == -1)
1752 options->server_alive_count_max = 3; 1762 options->server_alive_count_max = 3;
1753 if (options->control_master == -1) 1763 if (options->control_master == -1)