diff options
author | 2002-07-12 13:29:09 +0000 | |
---|---|---|
committer | 2002-07-12 13:29:09 +0000 | |
commit | 8805f900fe559b5f9981d635f739de0fb9d4cb34 (patch) | |
tree | 96eb099addf89824395a45db344f6776cac308e7 | |
parent | There is no "simple_lock_unlock" function... (diff) | |
download | wireguard-openbsd-8805f900fe559b5f9981d635f739de0fb9d4cb34.tar.xz wireguard-openbsd-8805f900fe559b5f9981d635f739de0fb9d4cb34.zip |
print connect failure during debugging mode.
-rw-r--r-- | usr.bin/ssh/sshconnect.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c index 6523afd892a..e642fa21b67 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.130 2002/07/10 10:28:15 itojun Exp $"); +RCSID("$OpenBSD: sshconnect.c,v 1.131 2002/07/12 13:29:09 itojun Exp $"); #include <openssl/bn.h> @@ -42,19 +42,6 @@ extern char *__progname; extern uid_t original_real_uid; extern uid_t original_effective_uid; -#if 0 -static const char * -sockaddr_ntop(struct sockaddr *sa, socklen_t salen) -{ - static char addrbuf[NI_MAXHOST]; - - if (getnameinfo(sa, salen, addrbuf, sizeof(addrbuf), NULL, 0, - NI_NUMERICHOST) != 0) - fatal("sockaddr_ntop: getnameinfo NI_NUMERICHOST failed"); - return addrbuf; -} -#endif - /* * Connect to the given ssh server using a proxy command. */ @@ -305,6 +292,8 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr, } else { if (errno == ECONNREFUSED) full_failure = 0; + debug("connect to address %s port %s: %s", + ntop, strport, strerror(errno)); /* * Close the failed socket; there appear to * be some problems when reusing a socket for |