diff options
author | 2002-07-10 10:28:15 +0000 | |
---|---|---|
committer | 2002-07-10 10:28:15 +0000 | |
commit | d6ec9545264929eb63f990f9687b042a2ca3a010 (patch) | |
tree | dded4f4f3d4ada314d91695affdf4c19f88f6459 | |
parent | make UserDir work w/ chroot. (diff) | |
download | wireguard-openbsd-d6ec9545264929eb63f990f9687b042a2ca3a010.tar.xz wireguard-openbsd-d6ec9545264929eb63f990f9687b042a2ca3a010.zip |
bark if all connection attempt fails.
-rw-r--r-- | usr.bin/ssh/sshconnect.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c index 176a6a2724a..6523afd892a 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.129 2002/07/09 12:04:02 itojun Exp $"); +RCSID("$OpenBSD: sshconnect.c,v 1.130 2002/07/10 10:28:15 itojun Exp $"); #include <openssl/bn.h> @@ -305,11 +305,6 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr, } else { if (errno == ECONNREFUSED) full_failure = 0; -#if 0 - log("ssh: connect to address %s port %s: %s", - sockaddr_ntop(ai->ai_addr, ai->ai_addrlen), - strport, strerror(errno)); -#endif /* * Close the failed socket; there appear to * be some problems when reusing a socket for @@ -332,8 +327,11 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr, freeaddrinfo(aitop); /* Return failure if we didn't get a successful connection. */ - if (attempt >= connection_attempts) + if (attempt >= connection_attempts) { + log("ssh: connect to host %s port %s: %s", + host, strport, strerror(errno)); return full_failure ? ECONNABORTED : ECONNREFUSED; + } debug("Connection established."); |