diff options
author | 2001-10-08 19:05:05 +0000 | |
---|---|---|
committer | 2001-10-08 19:05:05 +0000 | |
commit | b5b7941039b73eeabff691adece2cd1991b770f8 (patch) | |
tree | 5dfb46866f43dfa9f2460c38def8418dec96c4b3 /usr.bin/ssh/sshconnect.c | |
parent | Link order tweak so vax crunches happily. (diff) | |
download | wireguard-openbsd-b5b7941039b73eeabff691adece2cd1991b770f8.tar.xz wireguard-openbsd-b5b7941039b73eeabff691adece2cd1991b770f8.zip |
some more IPv4or6 cleanup
Diffstat (limited to 'usr.bin/ssh/sshconnect.c')
-rw-r--r-- | usr.bin/ssh/sshconnect.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c index c73b876d107..4841f73e892 100644 --- a/usr.bin/ssh/sshconnect.c +++ b/usr.bin/ssh/sshconnect.c @@ -13,7 +13,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect.c,v 1.114 2001/10/08 16:15:47 markus Exp $"); +RCSID("$OpenBSD: sshconnect.c,v 1.115 2001/10/08 19:05:05 markus Exp $"); #include <openssl/bn.h> @@ -38,9 +38,6 @@ char *server_version_string = NULL; extern Options options; extern char *__progname; -/* AF_UNSPEC or AF_INET or AF_INET6 */ -extern int IPv4or6; - static const char * sockaddr_ntop(struct sockaddr *sa) { @@ -239,9 +236,8 @@ ssh_create_socket(struct passwd *pw, int privileged, int family) */ int ssh_connect(const char *host, struct sockaddr_storage * hostaddr, - u_short port, int connection_attempts, - int anonymous, struct passwd *pw, - const char *proxy_command) + u_short port, int family, int connection_attempts, + int anonymous, struct passwd *pw, const char *proxy_command) { int gaierr; int on = 1; @@ -275,7 +271,7 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr, /* No proxy command. */ memset(&hints, 0, sizeof(hints)); - hints.ai_family = IPv4or6; + hints.ai_family = family; hints.ai_socktype = SOCK_STREAM; snprintf(strport, sizeof strport, "%d", port); if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) |