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 831072fed..83582e394 100644
--- a/readconf.c
+++ b/readconf.c
@@ -160,6 +160,7 @@ typedef enum {
160 oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, 160 oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys,
161 oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, 161 oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes,
162 oPubkeyAcceptedKeyTypes, 162 oPubkeyAcceptedKeyTypes,
163 oProtocolKeepAlives, oSetupTimeOut,
163 oIgnoredUnknownOption, oDeprecated, oUnsupported 164 oIgnoredUnknownOption, oDeprecated, oUnsupported
164} OpCodes; 165} OpCodes;
165 166
@@ -290,6 +291,8 @@ static struct {
290 { "hostbasedkeytypes", oHostbasedKeyTypes }, 291 { "hostbasedkeytypes", oHostbasedKeyTypes },
291 { "pubkeyacceptedkeytypes", oPubkeyAcceptedKeyTypes }, 292 { "pubkeyacceptedkeytypes", oPubkeyAcceptedKeyTypes },
292 { "ignoreunknown", oIgnoreUnknown }, 293 { "ignoreunknown", oIgnoreUnknown },
294 { "protocolkeepalives", oProtocolKeepAlives },
295 { "setuptimeout", oSetupTimeOut },
293 296
294 { NULL, oBadOption } 297 { NULL, oBadOption }
295}; 298};
@@ -1304,6 +1307,8 @@ parse_keytypes:
1304 goto parse_flag; 1307 goto parse_flag;
1305 1308
1306 case oServerAliveInterval: 1309 case oServerAliveInterval:
1310 case oProtocolKeepAlives: /* Debian-specific compatibility alias */
1311 case oSetupTimeOut: /* Debian-specific compatibility alias */
1307 intptr = &options->server_alive_interval; 1312 intptr = &options->server_alive_interval;
1308 goto parse_time; 1313 goto parse_time;
1309 1314
@@ -1856,8 +1861,13 @@ fill_default_options(Options * options)
1856 options->rekey_interval = 0; 1861 options->rekey_interval = 0;
1857 if (options->verify_host_key_dns == -1) 1862 if (options->verify_host_key_dns == -1)
1858 options->verify_host_key_dns = 0; 1863 options->verify_host_key_dns = 0;
1859 if (options->server_alive_interval == -1) 1864 if (options->server_alive_interval == -1) {
1860 options->server_alive_interval = 0; 1865 /* in batch mode, default is 5mins */
1866 if (options->batch_mode == 1)
1867 options->server_alive_interval = 300;
1868 else
1869 options->server_alive_interval = 0;
1870 }
1861 if (options->server_alive_count_max == -1) 1871 if (options->server_alive_count_max == -1)
1862 options->server_alive_count_max = 3; 1872 options->server_alive_count_max = 3;
1863 if (options->control_master == -1) 1873 if (options->control_master == -1)