summaryrefslogtreecommitdiff
path: root/sshconnect.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-07-15 17:48:11 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-07-15 17:48:11 +0000
commit728aa7e18c378ce990aa3419917c665181904ba8 (patch)
tree57a0952a31010299b3e421cdc0d29e6a9a823747 /sshconnect.c
parent370e0bac16cd71417e45af489a60b1621e20f041 (diff)
- itojun@cvs.openbsd.org 2002/07/12 13:29:09
[sshconnect.c] print connect failure during debugging mode.
Diffstat (limited to 'sshconnect.c')
-rw-r--r--sshconnect.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/sshconnect.c b/sshconnect.c
index ae6c5f32..9f8458dc 100644
--- a/sshconnect.c
+++ b/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>
@@ -46,19 +46,6 @@ extern uid_t original_effective_uid;
#define INET6_ADDRSTRLEN 46
#endif
-#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.
*/
@@ -309,6 +296,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