summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-06-11 16:47:22 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-06-11 16:47:22 +0000
commit9a17c9a568904d08b3d1e01ff5fc78ebd060101c (patch)
treea635212244742b48db1a455b86c6a9b3618400d0
parentce0f6342702a660f97b57cbdeb671feb02bae382 (diff)
- itojun@cvs.openbsd.org 2002/06/11 08:11:45
[canohost.c] use "ntop" only after initialized
-rw-r--r--ChangeLog5
-rw-r--r--canohost.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index eb4ef220..202c8699 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,9 @@
[auth-krb4.c monitor.h serverloop.c session.c ssh-agent.c sshd.c]
pid_t cleanup. Markus need this now to keep hacking.
markus@, millert@ ok
+ - itojun@cvs.openbsd.org 2002/06/11 08:11:45
+ [canohost.c]
+ use "ntop" only after initialized
20020609
- (bal) OpenBSD CVS Sync
@@ -904,4 +907,4 @@
- (stevesk) entropy.c: typo in debug message
- (djm) ssh-keygen -i needs seeded RNG; report from markus@
-$Id: ChangeLog,v 1.2209 2002/06/11 16:42:49 mouring Exp $
+$Id: ChangeLog,v 1.2210 2002/06/11 16:47:22 mouring Exp $
diff --git a/canohost.c b/canohost.c
index 03005aa2..00c499ca 100644
--- a/canohost.c
+++ b/canohost.c
@@ -12,7 +12,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: canohost.c,v 1.31 2002/02/27 21:23:13 stevesk Exp $");
+RCSID("$OpenBSD: canohost.c,v 1.32 2002/06/11 08:11:45 itojun Exp $");
#include "packet.h"
#include "xmalloc.h"
@@ -64,13 +64,14 @@ get_remote_hostname(int socket, int verify_reverse_mapping)
}
}
#endif
- if (from.ss_family == AF_INET)
- check_ip_options(socket, ntop);
if (getnameinfo((struct sockaddr *)&from, fromlen, ntop, sizeof(ntop),
NULL, 0, NI_NUMERICHOST) != 0)
fatal("get_remote_hostname: getnameinfo NI_NUMERICHOST failed");
+ if (from.ss_family == AF_INET)
+ check_ip_options(socket, ntop);
+
debug3("Trying to reverse map address %.100s.", ntop);
/* Map the IP address to a host name. */
if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name),