From owner-freebsd-stable@FreeBSD.ORG Sun Feb 26 00:46:17 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4F77416A420 for ; Sun, 26 Feb 2006 00:46:17 +0000 (GMT) (envelope-from ume@mahoroba.org) Received: from ameno.mahoroba.org (gw4.mahoroba.org [218.45.22.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2DA243D45 for ; Sun, 26 Feb 2006 00:46:16 +0000 (GMT) (envelope-from ume@mahoroba.org) Received: from kasuga.mahoroba.org (IDENT:v4YwoqyaiVoi3h9nC10pl69spVwlCMaWM9IeuFvg83dckQis66v+02pGj8nufN3m@kasuga-iwi.mahoroba.org [IPv6:3ffe:501:185b:8010:212:f0ff:fe52:6ac]) (user=ume mech=CRAM-MD5 bits=0) by ameno.mahoroba.org (8.13.4/8.13.4) with ESMTP/inet6 id k1Q0jYAs034600 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 26 Feb 2006 09:45:35 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Sun, 26 Feb 2006 09:45:34 +0900 Message-ID: From: Hajimu UMEMOTO To: Rostislav Krasny In-Reply-To: <20060226014630.cc0b04ab.rosti.bsd@gmail.com> References: <20060218012029.e146e2ff.rosti.bsd@gmail.com> <20060219104912.GB20500@comp.chem.msu.su> <20060219225701.0e3e244b.rosti.bsd@gmail.com> <20060221165959.GB77513@comp.chem.msu.su> <20060222024430.ad4b5c60.rosti.bsd@gmail.com> <20060223235727.33cddb13.rosti.bsd@gmail.com> <20060224155153.f7da1a52.rosti.bsd@gmail.com> <20060224174007.GF36227@comp.chem.msu.su> <20060225024246.d6284719.rosti.bsd@gmail.com> <20060225164648.a4eed65c.rosti.bsd@gmail.com> <20060226014630.cc0b04ab.rosti.bsd@gmail.com> User-Agent: xcite1.38> Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.0.50 (i386-unknown-freebsd6.1) MULE/5.0 (SAKAKI) X-Operating-System: FreeBSD 6.1-PRERELEASE X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE Organization: Internet Mutual Aid Society, YOKOHAMA MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.1.3 (ameno.mahoroba.org [IPv6:3ffe:501:185b:8010::1]); Sun, 26 Feb 2006 09:45:39 +0900 (JST) X-Virus-Scanned: by amavisd-new X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on ameno.mahoroba.org Cc: freebsd-stable@freebsd.org, freebsd-stable-local@be-well.ilk.org, yar@comp.chem.msu.su, dwmalone@maths.tcd.ie, des@des.no, mak@ll.mit.edu, MH@kernel32.de Subject: Re: SSH login takes very long time...sometimes X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Feb 2006 00:46:17 -0000 Hi, >>>>> On Sun, 26 Feb 2006 01:46:30 +0200 >>>>> Rostislav Krasny said: rosti.bsd> As far as I understand the code of selecthost() it walks through linked rosti.bsd> lists of known virtual hosts and their addresses and compares the rosti.bsd> addresses to a local address of connected socket. This way it tries to rosti.bsd> find - configuration of what virtual host should be used. There is an rosti.bsd> additional comparison that seems like a workaround for misconfigured rosti.bsd> virtual host that can be resolved only to IPv4 address and should be rosti.bsd> used on IPv4-mapped IPv6 address. If virtual hosts are properly rosti.bsd> configured that hack is not needed, IMHO. If you nuke this workaround from both selecthost() and my patch, you need to specify a native IPv4 address and/or an IPv4-mapped IPv6 address into ftphosts appropriately. It will confuse users. So, it is requierd. rosti.bsd> Anyway selecthost() is called with local socket name and it checks a rosti.bsd> local address, while his_addr.su_sin6.sin6_addr is a remote address. rosti.bsd> Local and remote hosts have same address families but not same rosti.bsd> addresses. The his_addr is referred to determine just an address family, here. When a remote address is an IPv4-mapped IPv6 address, a local address is as well. So, it should be okay. Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/