=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/canohost.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- src/usr.bin/ssh/canohost.c 2005/06/17 02:44:32 1.44 +++ src/usr.bin/ssh/canohost.c 2005/10/03 07:44:42 1.45 @@ -12,7 +12,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: canohost.c,v 1.44 2005/06/17 02:44:32 djm Exp $"); +RCSID("$OpenBSD: canohost.c,v 1.45 2005/10/03 07:44:42 dtucker Exp $"); #include "packet.h" #include "xmalloc.h" @@ -43,12 +43,12 @@ cleanup_exit(255); } - if (from.ss_family == AF_INET) - check_ip_options(sock, 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(sock, ntop); if (!use_dns) return xstrdup(ntop);