Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/dist/ssh print connect failure on debugging mode. sy...



details:   https://anonhg.NetBSD.org/src/rev/1c7471a2da2f
branches:  trunk
changeset: 533999:1c7471a2da2f
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri Jul 12 13:28:36 2002 +0000

description:
print connect failure on debugging mode.  sync w/openbsd

diffstat:

 crypto/dist/ssh/sshconnect.c |  19 ++++---------------
 1 files changed, 4 insertions(+), 15 deletions(-)

diffs (47 lines):

diff -r c7b4e938d887 -r 1c7471a2da2f crypto/dist/ssh/sshconnect.c
--- a/crypto/dist/ssh/sshconnect.c      Fri Jul 12 13:04:03 2002 +0000
+++ b/crypto/dist/ssh/sshconnect.c      Fri Jul 12 13:28:36 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sshconnect.c,v 1.22 2002/07/10 10:28:00 itojun Exp $   */
+/*     $NetBSD: sshconnect.c,v 1.23 2002/07/12 13:28:36 itojun Exp $   */
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
  * Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
@@ -14,7 +14,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>
 
@@ -43,19 +43,6 @@
 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.
  */
@@ -306,6 +293,8 @@
                        } 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



Home | Main Index | Thread Index | Old Index