summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
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)