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 eb4ef220d..202c8699c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,9 @@
39 [auth-krb4.c monitor.h serverloop.c session.c ssh-agent.c sshd.c] 39 [auth-krb4.c monitor.h serverloop.c session.c ssh-agent.c sshd.c]
40 pid_t cleanup. Markus need this now to keep hacking. 40 pid_t cleanup. Markus need this now to keep hacking.
41 markus@, millert@ ok 41 markus@, millert@ ok
42 - itojun@cvs.openbsd.org 2002/06/11 08:11:45
43 [canohost.c]
44 use "ntop" only after initialized
42 45
4320020609 4620020609
44 - (bal) OpenBSD CVS Sync 47 - (bal) OpenBSD CVS Sync
@@ -904,4 +907,4 @@
904 - (stevesk) entropy.c: typo in debug message 907 - (stevesk) entropy.c: typo in debug message
905 - (djm) ssh-keygen -i needs seeded RNG; report from markus@ 908 - (djm) ssh-keygen -i needs seeded RNG; report from markus@
906 909
907$Id: ChangeLog,v 1.2209 2002/06/11 16:42:49 mouring Exp $ 910$Id: ChangeLog,v 1.2210 2002/06/11 16:47:22 mouring Exp $
diff --git a/canohost.c b/canohost.c
index 03005aa29..00c499ca0 100644
--- a/canohost.c
+++ b/canohost.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: canohost.c,v 1.31 2002/02/27 21:23:13 stevesk Exp $"); 15RCSID("$OpenBSD: canohost.c,v 1.32 2002/06/11 08:11:45 itojun Exp $");
16 16
17#include "packet.h" 17#include "packet.h"
18#include "xmalloc.h" 18#include "xmalloc.h"
@@ -64,13 +64,14 @@ get_remote_hostname(int socket, int verify_reverse_mapping)
64 } 64 }
65 } 65 }
66#endif 66#endif
67 if (from.ss_family == AF_INET)
68 check_ip_options(socket, ntop);
69 67
70 if (getnameinfo((struct sockaddr *)&from, fromlen, ntop, sizeof(ntop), 68 if (getnameinfo((struct sockaddr *)&from, fromlen, ntop, sizeof(ntop),
71 NULL, 0, NI_NUMERICHOST) != 0) 69 NULL, 0, NI_NUMERICHOST) != 0)
72 fatal("get_remote_hostname: getnameinfo NI_NUMERICHOST failed"); 70 fatal("get_remote_hostname: getnameinfo NI_NUMERICHOST failed");
73 71
72 if (from.ss_family == AF_INET)
73 check_ip_options(socket, ntop);
74
74 debug3("Trying to reverse map address %.100s.", ntop); 75 debug3("Trying to reverse map address %.100s.", ntop);
75 /* Map the IP address to a host name. */ 76 /* Map the IP address to a host name. */
76 if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name), 77 if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name),