diff options
Diffstat (limited to 'readconf.c')
-rw-r--r-- | readconf.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/readconf.c b/readconf.c index a4fe1fe02..aca5b8eff 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -107,6 +107,7 @@ typedef enum { | |||
107 | oAddressFamily, oGssAuthentication, oGssDelegateCreds, | 107 | oAddressFamily, oGssAuthentication, oGssDelegateCreds, |
108 | oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly, | 108 | oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly, |
109 | oSendEnv, oControlPath, oControlMaster, | 109 | oSendEnv, oControlPath, oControlMaster, |
110 | oProtocolKeepAlives, oSetupTimeOut, | ||
110 | oDeprecated, oUnsupported | 111 | oDeprecated, oUnsupported |
111 | } OpCodes; | 112 | } OpCodes; |
112 | 113 | ||
@@ -197,6 +198,8 @@ static struct { | |||
197 | { "sendenv", oSendEnv }, | 198 | { "sendenv", oSendEnv }, |
198 | { "controlpath", oControlPath }, | 199 | { "controlpath", oControlPath }, |
199 | { "controlmaster", oControlMaster }, | 200 | { "controlmaster", oControlMaster }, |
201 | { "protocolkeepalives", oProtocolKeepAlives }, | ||
202 | { "setuptimeout", oSetupTimeOut }, | ||
200 | { NULL, oBadOption } | 203 | { NULL, oBadOption } |
201 | }; | 204 | }; |
202 | 205 | ||
@@ -746,6 +749,7 @@ parse_int: | |||
746 | goto parse_flag; | 749 | goto parse_flag; |
747 | 750 | ||
748 | case oServerAliveInterval: | 751 | case oServerAliveInterval: |
752 | case oProtocolKeepAlives: /* Debian-specific compatibility alias */ | ||
749 | intptr = &options->server_alive_interval; | 753 | intptr = &options->server_alive_interval; |
750 | goto parse_time; | 754 | goto parse_time; |
751 | 755 | ||
@@ -774,6 +778,10 @@ parse_int: | |||
774 | intptr = &options->control_master; | 778 | intptr = &options->control_master; |
775 | goto parse_yesnoask; | 779 | goto parse_yesnoask; |
776 | 780 | ||
781 | case oSetupTimeOut: | ||
782 | intptr = &options->setuptimeout; | ||
783 | goto parse_int; | ||
784 | |||
777 | case oDeprecated: | 785 | case oDeprecated: |
778 | debug("%s line %d: Deprecated option \"%s\"", | 786 | debug("%s line %d: Deprecated option \"%s\"", |
779 | filename, linenum, keyword); | 787 | filename, linenum, keyword); |
@@ -879,6 +887,7 @@ initialize_options(Options * options) | |||
879 | options->strict_host_key_checking = -1; | 887 | options->strict_host_key_checking = -1; |
880 | options->compression = -1; | 888 | options->compression = -1; |
881 | options->tcp_keep_alive = -1; | 889 | options->tcp_keep_alive = -1; |
890 | options->setuptimeout = -1; | ||
882 | options->compression_level = -1; | 891 | options->compression_level = -1; |
883 | options->port = -1; | 892 | options->port = -1; |
884 | options->address_family = -1; | 893 | options->address_family = -1; |
@@ -934,7 +943,7 @@ fill_default_options(Options * options) | |||
934 | if (options->forward_x11 == -1) | 943 | if (options->forward_x11 == -1) |
935 | options->forward_x11 = 0; | 944 | options->forward_x11 = 0; |
936 | if (options->forward_x11_trusted == -1) | 945 | if (options->forward_x11_trusted == -1) |
937 | options->forward_x11_trusted = 0; | 946 | options->forward_x11_trusted = 1; |
938 | if (options->xauth_location == NULL) | 947 | if (options->xauth_location == NULL) |
939 | options->xauth_location = _PATH_XAUTH; | 948 | options->xauth_location = _PATH_XAUTH; |
940 | if (options->gateway_ports == -1) | 949 | if (options->gateway_ports == -1) |
@@ -1033,12 +1042,24 @@ fill_default_options(Options * options) | |||
1033 | options->rekey_limit = 0; | 1042 | options->rekey_limit = 0; |
1034 | if (options->verify_host_key_dns == -1) | 1043 | if (options->verify_host_key_dns == -1) |
1035 | options->verify_host_key_dns = 0; | 1044 | options->verify_host_key_dns = 0; |
1036 | if (options->server_alive_interval == -1) | 1045 | if (options->server_alive_interval == -1) { |
1037 | options->server_alive_interval = 0; | 1046 | /* in batch mode, default is 5mins */ |
1047 | if (options->batch_mode == 1) | ||
1048 | options->server_alive_interval = 300; | ||
1049 | else | ||
1050 | options->server_alive_interval = 0; | ||
1051 | } | ||
1038 | if (options->server_alive_count_max == -1) | 1052 | if (options->server_alive_count_max == -1) |
1039 | options->server_alive_count_max = 3; | 1053 | options->server_alive_count_max = 3; |
1040 | if (options->control_master == -1) | 1054 | if (options->control_master == -1) |
1041 | options->control_master = 0; | 1055 | options->control_master = 0; |
1056 | if (options->setuptimeout == -1) { | ||
1057 | /* in batch mode, default is 5mins */ | ||
1058 | if (options->batch_mode == 1) | ||
1059 | options->setuptimeout = 300; | ||
1060 | else | ||
1061 | options->setuptimeout = 0; | ||
1062 | } | ||
1042 | /* options->proxy_command should not be set by default */ | 1063 | /* options->proxy_command should not be set by default */ |
1043 | /* options->user will be set in the main program if appropriate */ | 1064 | /* options->user will be set in the main program if appropriate */ |
1044 | /* options->hostname will be set in the main program if appropriate */ | 1065 | /* options->hostname will be set in the main program if appropriate */ |