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 22e5a3a61..2dcbf3187 100644
--- a/readconf.c
+++ b/readconf.c
@@ -141,6 +141,7 @@ typedef enum {
141 oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand, 141 oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand,
142 oVisualHostKey, oUseRoaming, oZeroKnowledgePasswordAuthentication, 142 oVisualHostKey, oUseRoaming, oZeroKnowledgePasswordAuthentication,
143 oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown, 143 oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown,
144 oProtocolKeepAlives, oSetupTimeOut,
144 oIgnoredUnknownOption, oDeprecated, oUnsupported 145 oIgnoredUnknownOption, oDeprecated, oUnsupported
145} OpCodes; 146} OpCodes;
146 147
@@ -263,6 +264,8 @@ static struct {
263 { "ipqos", oIPQoS }, 264 { "ipqos", oIPQoS },
264 { "requesttty", oRequestTTY }, 265 { "requesttty", oRequestTTY },
265 { "ignoreunknown", oIgnoreUnknown }, 266 { "ignoreunknown", oIgnoreUnknown },
267 { "protocolkeepalives", oProtocolKeepAlives },
268 { "setuptimeout", oSetupTimeOut },
266 269
267 { NULL, oBadOption } 270 { NULL, oBadOption }
268}; 271};
@@ -939,6 +942,8 @@ parse_int:
939 goto parse_flag; 942 goto parse_flag;
940 943
941 case oServerAliveInterval: 944 case oServerAliveInterval:
945 case oProtocolKeepAlives: /* Debian-specific compatibility alias */
946 case oSetupTimeOut: /* Debian-specific compatibility alias */
942 intptr = &options->server_alive_interval; 947 intptr = &options->server_alive_interval;
943 goto parse_time; 948 goto parse_time;
944 949
@@ -1404,8 +1409,13 @@ fill_default_options(Options * options)
1404 options->rekey_interval = 0; 1409 options->rekey_interval = 0;
1405 if (options->verify_host_key_dns == -1) 1410 if (options->verify_host_key_dns == -1)
1406 options->verify_host_key_dns = 0; 1411 options->verify_host_key_dns = 0;
1407 if (options->server_alive_interval == -1) 1412 if (options->server_alive_interval == -1) {
1408 options->server_alive_interval = 0; 1413 /* in batch mode, default is 5mins */
1414 if (options->batch_mode == 1)
1415 options->server_alive_interval = 300;
1416 else
1417 options->server_alive_interval = 0;
1418 }
1409 if (options->server_alive_count_max == -1) 1419 if (options->server_alive_count_max == -1)
1410 options->server_alive_count_max = 3; 1420 options->server_alive_count_max = 3;
1411 if (options->control_master == -1) 1421 if (options->control_master == -1)