summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-07-12 13:29:10 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-07-12 13:29:10 +0000
commitf90e7f70ccd22bbaedf27946aa5f0900fbdd01db (patch)
tree17edbc4a33cb3dc2f0ef36e37aed865496c5a7cf
parent27ab92990ba25362f751bbda6e9dc0cf6b2eff3c (diff)
print connect failure during debugging mode.
-rw-r--r--usr.bin/ssh/sshconnect.c17
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