diff options
Diffstat (limited to 'readconf.c')
-rw-r--r-- | readconf.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/readconf.c b/readconf.c index 85eea4800..5c5890c88 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -159,6 +159,7 @@ typedef enum { | |||
159 | oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs, | 159 | oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs, |
160 | oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, | 160 | oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, |
161 | oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, | 161 | oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, |
162 | oProtocolKeepAlives, oSetupTimeOut, | ||
162 | oIgnoredUnknownOption, oDeprecated, oUnsupported | 163 | oIgnoredUnknownOption, oDeprecated, oUnsupported |
163 | } OpCodes; | 164 | } OpCodes; |
164 | 165 | ||
@@ -288,6 +289,8 @@ static struct { | |||
288 | { "updatehostkeys", oUpdateHostkeys }, | 289 | { "updatehostkeys", oUpdateHostkeys }, |
289 | { "hostbasedkeytypes", oHostbasedKeyTypes }, | 290 | { "hostbasedkeytypes", oHostbasedKeyTypes }, |
290 | { "ignoreunknown", oIgnoreUnknown }, | 291 | { "ignoreunknown", oIgnoreUnknown }, |
292 | { "protocolkeepalives", oProtocolKeepAlives }, | ||
293 | { "setuptimeout", oSetupTimeOut }, | ||
291 | 294 | ||
292 | { NULL, oBadOption } | 295 | { NULL, oBadOption } |
293 | }; | 296 | }; |
@@ -1299,6 +1302,8 @@ parse_int: | |||
1299 | goto parse_flag; | 1302 | goto parse_flag; |
1300 | 1303 | ||
1301 | case oServerAliveInterval: | 1304 | case oServerAliveInterval: |
1305 | case oProtocolKeepAlives: /* Debian-specific compatibility alias */ | ||
1306 | case oSetupTimeOut: /* Debian-specific compatibility alias */ | ||
1302 | intptr = &options->server_alive_interval; | 1307 | intptr = &options->server_alive_interval; |
1303 | goto parse_time; | 1308 | goto parse_time; |
1304 | 1309 | ||
@@ -1858,8 +1863,13 @@ fill_default_options(Options * options) | |||
1858 | options->rekey_interval = 0; | 1863 | options->rekey_interval = 0; |
1859 | if (options->verify_host_key_dns == -1) | 1864 | if (options->verify_host_key_dns == -1) |
1860 | options->verify_host_key_dns = 0; | 1865 | options->verify_host_key_dns = 0; |
1861 | if (options->server_alive_interval == -1) | 1866 | if (options->server_alive_interval == -1) { |
1862 | options->server_alive_interval = 0; | 1867 | /* in batch mode, default is 5mins */ |
1868 | if (options->batch_mode == 1) | ||
1869 | options->server_alive_interval = 300; | ||
1870 | else | ||
1871 | options->server_alive_interval = 0; | ||
1872 | } | ||
1863 | if (options->server_alive_count_max == -1) | 1873 | if (options->server_alive_count_max == -1) |
1864 | options->server_alive_count_max = 3; | 1874 | options->server_alive_count_max = 3; |
1865 | if (options->control_master == -1) | 1875 | if (options->control_master == -1) |