summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2004-03-31 21:58:47 +0000
committerdjm <djm@openbsd.org>2004-03-31 21:58:47 +0000
commit443da3df574873b112267be0a421c1e431a38d38 (patch)
treeba174979104dd3a5a521f393fd3f49b721ac2185
parentallow cross-compiling for m68k and better usage(); miod@ ok (diff)
downloadwireguard-openbsd-443da3df574873b112267be0a421c1e431a38d38.tar.xz
wireguard-openbsd-443da3df574873b112267be0a421c1e431a38d38.zip
don't skip ip options check when UseDNS=no; ok markus@
-rw-r--r--usr.bin/ssh/canohost.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/canohost.c b/usr.bin/ssh/canohost.c
index 49089747fd9..b578ae66137 100644
--- a/usr.bin/ssh/canohost.c
+++ b/usr.bin/ssh/canohost.c
@@ -12,7 +12,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: canohost.c,v 1.38 2003/09/23 20:17:11 markus Exp $");
+RCSID("$OpenBSD: canohost.c,v 1.39 2004/03/31 21:58:47 djm Exp $");
#include "packet.h"
#include "xmalloc.h"
@@ -43,6 +43,9 @@ get_remote_hostname(int socket, int use_dns)
cleanup_exit(255);
}
+ 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");
@@ -50,9 +53,6 @@ get_remote_hostname(int socket, int use_dns)
if (!use_dns)
return xstrdup(ntop);
- 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),