]> andersk Git - openssh.git/blobdiff - canohost.c
20070326
[openssh.git] / canohost.c
index 35ae9bedecc2728f647b8df2527cbe504fd0a590..2345cc35c3154b35ab36e09325951305b6178f9c 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: canohost.c,v 1.53 2006/03/25 13:17:01 djm Exp $ */
+/* $OpenBSD: canohost.c,v 1.61 2006/08/03 03:34:41 deraadt Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
 
 #include "includes.h"
 
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
 #include <ctype.h>
+#include <errno.h>
+#include <netdb.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
 
-#include "packet.h"
 #include "xmalloc.h"
+#include "packet.h"
 #include "log.h"
 #include "canohost.h"
 
@@ -45,6 +57,9 @@ get_remote_hostname(int sock, int use_dns)
                cleanup_exit(255);
        }
 
+       if (from.ss_family == AF_INET)
+               check_ip_options(sock, ntop);
+
        ipv64_normalise_mapped(&from, &fromlen);
 
        if (from.ss_family == AF_INET6)
@@ -54,9 +69,6 @@ get_remote_hostname(int sock, int use_dns)
            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);
 
This page took 0.053255 seconds and 4 git commands to generate.