From 79cf0b3654d7b597de323153eb57015cdfbd90a4 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 1 Sep 2003 00:51:03 +0000 Subject: Debian release 3.4p1-1. --- readconf.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'readconf.c') diff --git a/readconf.c b/readconf.c index 80d99fef1..399855bd4 100644 --- a/readconf.c +++ b/readconf.c @@ -81,6 +81,8 @@ RCSID("$OpenBSD: readconf.c,v 1.100 2002/06/19 00:27:55 deraadt Exp $"); RhostsRSAAuthentication yes StrictHostKeyChecking yes KeepAlives no + ProtocolKeepAlives 0 + SetupTimeOut 0 IdentityFile ~/.ssh/identity Port 22 EscapeChar ~ @@ -114,6 +116,7 @@ typedef enum { oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication, oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, oClearAllForwardings, oNoHostAuthenticationForLocalhost, + oProtocolKeepAlives, oSetupTimeOut, oDeprecated } OpCodes; @@ -186,6 +189,8 @@ static struct { { "smartcarddevice", oSmartcardDevice }, { "clearallforwardings", oClearAllForwardings }, { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost }, + { "protocolkeepalives", oProtocolKeepAlives }, + { "setuptimeout", oSetupTimeOut }, { NULL, oBadOption } }; @@ -411,6 +416,14 @@ parse_flag: intptr = &options->no_host_authentication_for_localhost; goto parse_flag; + case oProtocolKeepAlives: + intptr = &options->protocolkeepalives; + goto parse_int; + + case oSetupTimeOut: + intptr = &options->setuptimeout; + goto parse_int; + case oNumberOfPasswordPrompts: intptr = &options->number_of_password_prompts; goto parse_int; @@ -766,6 +779,8 @@ initialize_options(Options * options) options->strict_host_key_checking = -1; options->compression = -1; options->keepalives = -1; + options->protocolkeepalives = -1; + options->setuptimeout = -1; options->compression_level = -1; options->port = -1; options->connection_attempts = -1; @@ -853,6 +868,14 @@ fill_default_options(Options * options) options->compression = 0; if (options->keepalives == -1) options->keepalives = 1; + if (options->protocolkeepalives == -1){ + if (options->batch_mode == 1) /*in batch mode, default is 5mins */ + options->protocolkeepalives = 300; + else options->protocolkeepalives = 0;} + if (options->setuptimeout == -1){ + if (options->batch_mode == 1) /*in batch mode, default is 5mins */ + options->setuptimeout = 300; + else options->setuptimeout = 0;} if (options->compression_level == -1) options->compression_level = 6; if (options->port == -1) -- cgit v1.2.3