summaryrefslogtreecommitdiff
path: root/canohost.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-10-03 18:23:44 +1000
committerDarren Tucker <dtucker@zip.com.au>2005-10-03 18:23:44 +1000
commitb0b12296f9c781e896fecbcab0ecd8223ecacc0a (patch)
treeec3e5c36993e5ad08e0e13dc74b322e9ab3c23c6 /canohost.c
parent28e8e59b3560e364e9bee758b2e4b2f987683267 (diff)
- dtucker@cvs.openbsd.org 2005/10/03 07:44:42
[canohost.c] Relocate check_ip_options call to prevent logging of garbage for connections with IP options set. bz#1092 from David Leonard, "looks good" deraadt@
Diffstat (limited to 'canohost.c')
-rw-r--r--canohost.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/canohost.c b/canohost.c
index c27086bf..0c4d36ff 100644
--- a/canohost.c
+++ b/canohost.c
@@ -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,9 +43,6 @@ 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)
@@ -55,6 +52,9 @@ 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);