diff options
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -42,7 +42,7 @@ | |||
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include "includes.h" | 44 | #include "includes.h" |
45 | RCSID("$OpenBSD: sshd.c,v 1.304 2004/09/25 03:45:14 djm Exp $"); | 45 | RCSID("$OpenBSD: sshd.c,v 1.305 2004/12/23 23:11:00 djm Exp $"); |
46 | 46 | ||
47 | #include <openssl/dh.h> | 47 | #include <openssl/dh.h> |
48 | #include <openssl/bn.h> | 48 | #include <openssl/bn.h> |
@@ -112,12 +112,6 @@ ServerOptions options; | |||
112 | char *config_file_name = _PATH_SERVER_CONFIG_FILE; | 112 | char *config_file_name = _PATH_SERVER_CONFIG_FILE; |
113 | 113 | ||
114 | /* | 114 | /* |
115 | * Flag indicating whether IPv4 or IPv6. This can be set on the command line. | ||
116 | * Default value is AF_UNSPEC means both IPv4 and IPv6. | ||
117 | */ | ||
118 | int IPv4or6 = AF_UNSPEC; | ||
119 | |||
120 | /* | ||
121 | * Debug mode flag. This can be set on the command line. If debug | 115 | * Debug mode flag. This can be set on the command line. If debug |
122 | * mode is enabled, extra debugging output will be sent to the system | 116 | * mode is enabled, extra debugging output will be sent to the system |
123 | * log, the daemon will not go to background, and will exit after processing | 117 | * log, the daemon will not go to background, and will exit after processing |
@@ -920,10 +914,10 @@ main(int ac, char **av) | |||
920 | while ((opt = getopt(ac, av, "f:p:b:k:h:g:u:o:dDeiqrtQR46")) != -1) { | 914 | while ((opt = getopt(ac, av, "f:p:b:k:h:g:u:o:dDeiqrtQR46")) != -1) { |
921 | switch (opt) { | 915 | switch (opt) { |
922 | case '4': | 916 | case '4': |
923 | IPv4or6 = AF_INET; | 917 | options.address_family = AF_INET; |
924 | break; | 918 | break; |
925 | case '6': | 919 | case '6': |
926 | IPv4or6 = AF_INET6; | 920 | options.address_family = AF_INET6; |
927 | break; | 921 | break; |
928 | case 'f': | 922 | case 'f': |
929 | config_file_name = optarg; | 923 | config_file_name = optarg; |
@@ -1024,7 +1018,6 @@ main(int ac, char **av) | |||
1024 | closefrom(REEXEC_DEVCRYPTO_RESERVED_FD); | 1018 | closefrom(REEXEC_DEVCRYPTO_RESERVED_FD); |
1025 | 1019 | ||
1026 | SSLeay_add_all_algorithms(); | 1020 | SSLeay_add_all_algorithms(); |
1027 | channel_set_af(IPv4or6); | ||
1028 | 1021 | ||
1029 | /* | 1022 | /* |
1030 | * Force logging to stderr until we have loaded the private host | 1023 | * Force logging to stderr until we have loaded the private host |
@@ -1074,6 +1067,9 @@ main(int ac, char **av) | |||
1074 | /* Fill in default values for those options not explicitly set. */ | 1067 | /* Fill in default values for those options not explicitly set. */ |
1075 | fill_default_server_options(&options); | 1068 | fill_default_server_options(&options); |
1076 | 1069 | ||
1070 | /* set default channel AF */ | ||
1071 | channel_set_af(options.address_family); | ||
1072 | |||
1077 | /* Check that there are no remaining arguments. */ | 1073 | /* Check that there are no remaining arguments. */ |
1078 | if (optind < ac) { | 1074 | if (optind < ac) { |
1079 | fprintf(stderr, "Extra argument %s.\n", av[optind]); | 1075 | fprintf(stderr, "Extra argument %s.\n", av[optind]); |