=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/canohost.c,v retrieving revision 1.31 retrieving revision 1.31.2.1 diff -u -r1.31 -r1.31.2.1 --- src/usr.bin/ssh/canohost.c 2002/02/27 21:23:13 1.31 +++ src/usr.bin/ssh/canohost.c 2002/06/26 15:30:37 1.31.2.1 @@ -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.31.2.1 2002/06/26 15:30:37 jason Exp $"); #include "packet.h" #include "xmalloc.h" @@ -42,12 +42,13 @@ debug("getpeername failed: %.100s", strerror(errno)); fatal_cleanup(); } - 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. */