summaryrefslogtreecommitdiff
path: root/canohost.c
diff options
context:
space:
mode:
authormouring <mouring>2002-06-11 16:47:22 +0000
committermouring <mouring>2002-06-11 16:47:22 +0000
commit3082572cc21400f9e87eff76abcc0fe0a45a3aab (patch)
treeb7f9e329697bafaede973b8a0d3e6837080ea26c /canohost.c
parent1e14f949fdd90d1a65c6c5c40ab43663a953be80 (diff)
downloadopenssh-3082572cc21400f9e87eff76abcc0fe0a45a3aab.tar.gz
- itojun@cvs.openbsd.org 2002/06/11 08:11:45
[canohost.c] use "ntop" only after initialized
Diffstat (limited to 'canohost.c')
-rw-r--r--canohost.c7
1 files changed, 4 insertions, 3 deletions
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),