diff options
author | 2003-07-03 08:09:05 +0000 | |
---|---|---|
committer | 2003-07-03 08:09:05 +0000 | |
commit | aea7b5d8ab6aea549c798e57201427e39b5eca07 (patch) | |
tree | 472fb2c533f88ca403a78a3e1f694f2cc62da06c /usr.bin/ssh/ssh.c | |
parent | Fix a _C_LABEL() typo. (diff) | |
download | wireguard-openbsd-aea7b5d8ab6aea549c798e57201427e39b5eca07.tar.xz wireguard-openbsd-aea7b5d8ab6aea549c798e57201427e39b5eca07.zip |
fix AddressFamily option in config file, from brent@graveland.net; ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r-- | usr.bin/ssh/ssh.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index cb3c1b95362..58ae40bd8a4 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -40,7 +40,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.195 2003/07/02 20:37:48 markus Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.196 2003/07/03 08:09:06 djm Exp $"); #include <openssl/evp.h> #include <openssl/err.h> @@ -75,10 +75,6 @@ RCSID("$OpenBSD: ssh.c,v 1.195 2003/07/02 20:37:48 markus Exp $"); extern char *__progname; -/* Flag indicating whether IPv4 or IPv6. This can be set on the command line. - Default value is AF_UNSPEC means both IPv4 and IPv6. */ -int IPv4or6 = AF_UNSPEC; - /* Flag indicating whether debug mode is on. This can be set on the command line. */ int debug_flag = 0; @@ -271,10 +267,10 @@ again: options.protocol = SSH_PROTO_2; break; case '4': - IPv4or6 = AF_INET; + options.address_family = AF_INET; break; case '6': - IPv4or6 = AF_INET6; + options.address_family = AF_INET6; break; case 'n': stdin_null_flag = 1; @@ -505,7 +501,6 @@ again: SSLeay_add_all_algorithms(); ERR_load_crypto_strings(); - channel_set_af(IPv4or6); /* Initialize the command to execute on remote host. */ buffer_init(&command); @@ -577,6 +572,8 @@ again: /* Fill configuration defaults. */ fill_default_options(&options); + channel_set_af(options.address_family); + /* reinit */ log_init(av[0], options.log_level, SYSLOG_FACILITY_USER, 1); @@ -605,8 +602,8 @@ again: } /* Open a connection to the remote host. */ - if (ssh_connect(host, &hostaddr, options.port, IPv4or6, - options.connection_attempts, + if (ssh_connect(host, &hostaddr, options.port, + options.address_family, options.connection_attempts, original_effective_uid == 0 && options.use_privileged_port, options.proxy_command) != 0) exit(1); |