summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/readconf.c b/readconf.c
index 1df5ce2d9..18f7dae8a 100644
--- a/readconf.c
+++ b/readconf.c
@@ -81,6 +81,8 @@ RCSID("$OpenBSD: readconf.c,v 1.104 2003/04/01 10:22:21 markus Exp $");
81 RhostsRSAAuthentication yes 81 RhostsRSAAuthentication yes
82 StrictHostKeyChecking yes 82 StrictHostKeyChecking yes
83 KeepAlives no 83 KeepAlives no
84 ProtocolKeepAlives 0
85 SetupTimeOut 0
84 IdentityFile ~/.ssh/identity 86 IdentityFile ~/.ssh/identity
85 Port 22 87 Port 22
86 EscapeChar ~ 88 EscapeChar ~
@@ -115,6 +117,7 @@ typedef enum {
115 oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, 117 oHostKeyAlgorithms, oBindAddress, oSmartcardDevice,
116 oClearAllForwardings, oNoHostAuthenticationForLocalhost, 118 oClearAllForwardings, oNoHostAuthenticationForLocalhost,
117 oEnableSSHKeysign, 119 oEnableSSHKeysign,
120 oProtocolKeepAlives, oSetupTimeOut,
118 oDeprecated 121 oDeprecated
119} OpCodes; 122} OpCodes;
120 123
@@ -188,6 +191,8 @@ static struct {
188 { "clearallforwardings", oClearAllForwardings }, 191 { "clearallforwardings", oClearAllForwardings },
189 { "enablesshkeysign", oEnableSSHKeysign }, 192 { "enablesshkeysign", oEnableSSHKeysign },
190 { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost }, 193 { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost },
194 { "protocolkeepalives", oProtocolKeepAlives },
195 { "setuptimeout", oSetupTimeOut },
191 { NULL, oBadOption } 196 { NULL, oBadOption }
192}; 197};
193 198
@@ -415,6 +420,14 @@ parse_flag:
415 intptr = &options->no_host_authentication_for_localhost; 420 intptr = &options->no_host_authentication_for_localhost;
416 goto parse_flag; 421 goto parse_flag;
417 422
423 case oProtocolKeepAlives:
424 intptr = &options->protocolkeepalives;
425 goto parse_int;
426
427 case oSetupTimeOut:
428 intptr = &options->setuptimeout;
429 goto parse_int;
430
418 case oNumberOfPasswordPrompts: 431 case oNumberOfPasswordPrompts:
419 intptr = &options->number_of_password_prompts; 432 intptr = &options->number_of_password_prompts;
420 goto parse_int; 433 goto parse_int;
@@ -767,6 +780,8 @@ initialize_options(Options * options)
767 options->strict_host_key_checking = -1; 780 options->strict_host_key_checking = -1;
768 options->compression = -1; 781 options->compression = -1;
769 options->keepalives = -1; 782 options->keepalives = -1;
783 options->protocolkeepalives = -1;
784 options->setuptimeout = -1;
770 options->compression_level = -1; 785 options->compression_level = -1;
771 options->port = -1; 786 options->port = -1;
772 options->connection_attempts = -1; 787 options->connection_attempts = -1;
@@ -855,6 +870,14 @@ fill_default_options(Options * options)
855 options->compression = 0; 870 options->compression = 0;
856 if (options->keepalives == -1) 871 if (options->keepalives == -1)
857 options->keepalives = 1; 872 options->keepalives = 1;
873 if (options->protocolkeepalives == -1){
874 if (options->batch_mode == 1) /*in batch mode, default is 5mins */
875 options->protocolkeepalives = 300;
876 else options->protocolkeepalives = 0;}
877 if (options->setuptimeout == -1){
878 if (options->batch_mode == 1) /*in batch mode, default is 5mins */
879 options->setuptimeout = 300;
880 else options->setuptimeout = 0;}
858 if (options->compression_level == -1) 881 if (options->compression_level == -1)
859 options->compression_level = 6; 882 options->compression_level = 6;
860 if (options->port == -1) 883 if (options->port == -1)