summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-07-11 04:00:19 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-07-11 04:00:19 +0000
commita6cd75c49ed90186bb400c08b8878c2c711b9f58 (patch)
tree584347b996c032bd251c719efc61f989b1e2645f
parent9c44554a41cbefdd4898511607d997072aed2811 (diff)
- itojun@cvs.openbsd.org 2002/07/10 10:28:15
[sshconnect.c] bark if all connection attempt fails.
-rw-r--r--ChangeLog5
-rw-r--r--sshconnect.c12
2 files changed, 9 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index a2dc37ccb..b869756c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,9 @@
16 - stevesk@cvs.openbsd.org 2002/07/09 17:46:25 16 - stevesk@cvs.openbsd.org 2002/07/09 17:46:25
17 [sshd_config.5] 17 [sshd_config.5]
18 clarify no preference ordering in protocol list; ok markus@ 18 clarify no preference ordering in protocol list; ok markus@
19 - itojun@cvs.openbsd.org 2002/07/10 10:28:15
20 [sshconnect.c]
21 bark if all connection attempt fails.
19 22
2020020709 2320020709
21 - (bal) NO_IPPORT_RESERVED_CONCEPT used instead of CYGWIN so other platforms 24 - (bal) NO_IPPORT_RESERVED_CONCEPT used instead of CYGWIN so other platforms
@@ -1339,4 +1342,4 @@
1339 - (stevesk) entropy.c: typo in debug message 1342 - (stevesk) entropy.c: typo in debug message
1340 - (djm) ssh-keygen -i needs seeded RNG; report from markus@ 1343 - (djm) ssh-keygen -i needs seeded RNG; report from markus@
1341 1344
1342$Id: ChangeLog,v 1.2357 2002/07/11 03:59:18 mouring Exp $ 1345$Id: ChangeLog,v 1.2358 2002/07/11 04:00:19 mouring Exp $
diff --git a/sshconnect.c b/sshconnect.c
index ba5deb441..ae6c5f32b 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -13,7 +13,7 @@
13 */ 13 */
14 14
15#include "includes.h" 15#include "includes.h"
16RCSID("$OpenBSD: sshconnect.c,v 1.129 2002/07/09 12:04:02 itojun Exp $"); 16RCSID("$OpenBSD: sshconnect.c,v 1.130 2002/07/10 10:28:15 itojun Exp $");
17 17
18#include <openssl/bn.h> 18#include <openssl/bn.h>
19 19
@@ -309,11 +309,6 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
309 } else { 309 } else {
310 if (errno == ECONNREFUSED) 310 if (errno == ECONNREFUSED)
311 full_failure = 0; 311 full_failure = 0;
312#if 0
313 log("ssh: connect to address %s port %s: %s",
314 sockaddr_ntop(ai->ai_addr, ai->ai_addrlen),
315 strport, strerror(errno));
316#endif
317 /* 312 /*
318 * Close the failed socket; there appear to 313 * Close the failed socket; there appear to
319 * be some problems when reusing a socket for 314 * be some problems when reusing a socket for
@@ -336,8 +331,11 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
336 freeaddrinfo(aitop); 331 freeaddrinfo(aitop);
337 332
338 /* Return failure if we didn't get a successful connection. */ 333 /* Return failure if we didn't get a successful connection. */
339 if (attempt >= connection_attempts) 334 if (attempt >= connection_attempts) {
335 log("ssh: connect to host %s port %s: %s",
336 host, strport, strerror(errno));
340 return full_failure ? ECONNABORTED : ECONNREFUSED; 337 return full_failure ? ECONNABORTED : ECONNREFUSED;
338 }
341 339
342 debug("Connection established."); 340 debug("Connection established.");
343 341