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 915a0f7b7..dab7963d6 100644
--- a/readconf.c
+++ b/readconf.c
@@ -140,6 +140,7 @@ typedef enum {
140 oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand, 140 oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand,
141 oVisualHostKey, oUseRoaming, oZeroKnowledgePasswordAuthentication, 141 oVisualHostKey, oUseRoaming, oZeroKnowledgePasswordAuthentication,
142 oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown, 142 oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown,
143 oProtocolKeepAlives, oSetupTimeOut,
143 oIgnoredUnknownOption, oDeprecated, oUnsupported 144 oIgnoredUnknownOption, oDeprecated, oUnsupported
144} OpCodes; 145} OpCodes;
145 146
@@ -262,6 +263,8 @@ static struct {
262 { "ipqos", oIPQoS }, 263 { "ipqos", oIPQoS },
263 { "requesttty", oRequestTTY }, 264 { "requesttty", oRequestTTY },
264 { "ignoreunknown", oIgnoreUnknown }, 265 { "ignoreunknown", oIgnoreUnknown },
266 { "protocolkeepalives", oProtocolKeepAlives },
267 { "setuptimeout", oSetupTimeOut },
265 268
266 { NULL, oBadOption } 269 { NULL, oBadOption }
267}; 270};
@@ -934,6 +937,8 @@ parse_int:
934 goto parse_flag; 937 goto parse_flag;
935 938
936 case oServerAliveInterval: 939 case oServerAliveInterval:
940 case oProtocolKeepAlives: /* Debian-specific compatibility alias */
941 case oSetupTimeOut: /* Debian-specific compatibility alias */
937 intptr = &options->server_alive_interval; 942 intptr = &options->server_alive_interval;
938 goto parse_time; 943 goto parse_time;
939 944
@@ -1396,8 +1401,13 @@ fill_default_options(Options * options)
1396 options->rekey_interval = 0; 1401 options->rekey_interval = 0;
1397 if (options->verify_host_key_dns == -1) 1402 if (options->verify_host_key_dns == -1)
1398 options->verify_host_key_dns = 0; 1403 options->verify_host_key_dns = 0;
1399 if (options->server_alive_interval == -1) 1404 if (options->server_alive_interval == -1) {
1400 options->server_alive_interval = 0; 1405 /* in batch mode, default is 5mins */
1406 if (options->batch_mode == 1)
1407 options->server_alive_interval = 300;
1408 else
1409 options->server_alive_interval = 0;
1410 }
1401 if (options->server_alive_count_max == -1) 1411 if (options->server_alive_count_max == -1)
1402 options->server_alive_count_max = 3; 1412 options->server_alive_count_max = 3;
1403 if (options->control_master == -1) 1413 if (options->control_master == -1)