From 2eaf37d899a55c253ad42d13534a824bce9c8ed2 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Tue, 18 Apr 2006 15:13:16 +1000 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 | 7 ++++++- canohost.c | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c9d436915..5328aa9c4 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 @@ -4495,4 +4500,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4300 2006/03/31 12:14:57 djm Exp $ +$Id: ChangeLog,v 1.4301 2006/04/18 05:13:16 djm Exp $ diff --git a/canohost.c b/canohost.c index 35ae9bede..34b751a72 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);