From owner-freebsd-stable@FreeBSD.ORG Fri Feb 24 02:51:16 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 B8B0B16A420; Fri, 24 Feb 2006 02:51:15 +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 DF8E543D46; Fri, 24 Feb 2006 02:51:14 +0000 (GMT) (envelope-from ume@mahoroba.org) Received: from localhost (IDENT:68FR4QZbk498uC4alk02pKL40ZztYOEaNdQhgoq/1faPHkL1jWgzEnsyuaKBuWoF@localhost [IPv6:::1]) (user=ume mech=CRAM-MD5 bits=0) by ameno.mahoroba.org (8.13.4/8.13.4) with ESMTP/inet6 id k1O2oPVG031282 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 24 Feb 2006 11:50:26 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Fri, 24 Feb 2006 11:50:25 +0900 Message-ID: From: Hajimu UMEMOTO To: Rostislav Krasny In-Reply-To: <20060223235727.33cddb13.rosti.bsd@gmail.com> References: <59e2ee810512250841t75157e62rec9dc389ac716534@mail.gmail.com> <20051227101621.GA16276@walton.maths.tcd.ie> <86irrfoix5.fsf@xps.des.no> <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> 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-freebsd5.5) MULE/5.0 (SAKAKI) X-Operating-System: FreeBSD 5.5-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:::1]); Fri, 24 Feb 2006 11:50:31 +0900 (JST) X-Virus-Scanned: by amavisd-new X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 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, yar@comp.chem.msu.su, dwmalone@maths.tcd.ie, des@des.no, mak@ll.mit.edu, MH@kernel32.de, freebsd-stable-local@be-well.ilk.org 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: Fri, 24 Feb 2006 02:51:16 -0000 Hi, >>>>> On Thu, 23 Feb 2006 23:57:27 +0200 >>>>> Rostislav Krasny said: rosti> Your patch fixed the problem, thank you. Thank you for testing. I'll commit it later. rosti> But during my tests I've found rosti> another form of "doubling" bug in getaddrinfo(). To test the getaddrinfo() rosti> behavior I used a program that is attached to this email. rosti> If hints.ai_socktype == 0 then the getaddrinfo() does the lookup twice, rosti> even if DNS is reachable. If the latter is the case, returned linked rosti> list is twice as large than it should be. The hints.ai_socktype seems rosti> to have the same influence when hints.ai_family is PF_INET6 or rosti> PF_UNSPEC too. No, it is expected behavior of getaddrinfo(3). If hints.ai_socktype is zero, getaddrinfo(3) returns the entries for all available socktypes. Though getaddrinfo(3) returns doubled linkd list, getaddrinfo(3) does DNS lookup just once for all. If you don't want it, you need to specify appropriate socktype explicitly. Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/