summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-01-10 19:35:08 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-01-10 19:35:08 +0000
commit912cdb0adbdb1f460355e36e8615df51e92358a4 (patch)
treeeea36b14681f129fcbdcf49d3d149bcf694c2a94
parent51d44c76f8259d5eb15095863f32c368b5fd3efc (diff)
print proper host name for the proxy's peer; bob ok
-rw-r--r--libexec/ftp-proxy/ftp-proxy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libexec/ftp-proxy/ftp-proxy.c b/libexec/ftp-proxy/ftp-proxy.c
index 90e83b5886c..0867f569407 100644
--- a/libexec/ftp-proxy/ftp-proxy.c
+++ b/libexec/ftp-proxy/ftp-proxy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftp-proxy.c,v 1.18 2001/12/14 18:12:41 beck Exp $ */
+/* $OpenBSD: ftp-proxy.c,v 1.19 2002/01/10 19:35:07 mickey Exp $ */
/*
* Copyright (c) 1996-2001
@@ -1106,12 +1106,12 @@ main(int argc, char **argv)
* of our end of the server socket so we know our IP address
* from the real server's perspective.
*/
- i = getnameinfo((struct sockaddr *)&client_iob.sa,
- sizeof(client_iob.sa), OurName, sizeof(OurName), NULL, 0, flags);
-
salen = sizeof(server_iob.sa);
getsockname(server_iob.fd, (struct sockaddr *)&server_iob.sa, &salen);
+ i = getnameinfo((struct sockaddr *)&server_iob.sa,
+ sizeof(server_iob.sa), OurName, sizeof(OurName), NULL, 0, flags);
+
debuglog(1, "our end of socket to server is %s:%u\n", OurName,
ntohs(server_iob.sa.sin_port));