From 88680c8b631a28fdbe1e6eb4e1c1eb91e13862e7 Mon Sep 17 00:00:00 2001 From: djm Date: Tue, 18 Apr 2006 05:13:16 +0000 Subject: [PATCH] - (djm) Reorder IP options check so that it isn't broken by mapped addresses; bz #1179 reported by markw wtech-llc.com; ok dtucker@ --- ChangeLog | 5 +++++ canohost.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0c75ba47..8c78a502 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +20060418 + - (djm) Reorder IP options check so that it isn't broken by + mapped addresses; bz #1179 reported by markw wtech-llc.com; + ok dtucker@ + 20060331 - OpenBSD CVS Sync - deraadt@cvs.openbsd.org 2006/03/27 01:21:18 diff --git a/canohost.c b/canohost.c index 35ae9bed..34b751a7 100644 --- a/canohost.c +++ b/canohost.c @@ -45,6 +45,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 +57,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); -- 2.45.1