From owner-freebsd-stable@FreeBSD.ORG Thu Feb 23 21:59:02 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 CF98816A420 for ; Thu, 23 Feb 2006 21:59:02 +0000 (GMT) (envelope-from rosti.bsd@gmail.com) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id DED2643D46 for ; Thu, 23 Feb 2006 21:59:01 +0000 (GMT) (envelope-from rosti.bsd@gmail.com) Received: by nproxy.gmail.com with SMTP id n29so113775nfc for ; Thu, 23 Feb 2006 13:59:00 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; b=CHZdX57a37Vd10UtMpVndhR/Ek+otqIxuBA35mTQNUxSjxWM0IgYlkHyL4B0hIi1itL8/kzffVtpTUMJJpA2PpNP3TnhLAPtK1rFmFWOJOKpc2uKm92CrueOK78HPgnxty/rkp0dvq8/jKlhw8/1JOTBYvQblHnCJfGikzU+mzo= Received: by 10.48.203.19 with SMTP id a19mr2506228nfg; Thu, 23 Feb 2006 13:58:59 -0800 (PST) Received: from saturn.lan ( [212.143.154.227]) by mx.gmail.com with ESMTP id g1sm416107nfe.2006.02.23.13.58.55; Thu, 23 Feb 2006 13:58:58 -0800 (PST) Date: Thu, 23 Feb 2006 23:57:27 +0200 From: Rostislav Krasny To: Hajimu UMEMOTO Message-Id: <20060223235727.33cddb13.rosti.bsd@gmail.com> In-Reply-To: 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> X-Mailer: Sylpheed version 2.2.0 (GTK+ 2.8.12; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Thu__23_Feb_2006_23_57_27_+0200_tlC6au_hl+CwgArA" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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: Thu, 23 Feb 2006 21:59:03 -0000 This is a multi-part message in MIME format. --Multipart=_Thu__23_Feb_2006_23_57_27_+0200_tlC6au_hl+CwgArA Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 23 Feb 2006 02:08:17 +0900 Hajimu UMEMOTO wrote: > Hi, > > >>>>> On Wed, 22 Feb 2006 02:44:30 +0200 > >>>>> Rostislav Krasny said: > > rosti> On Tue, 21 Feb 2006 19:59:59 +0300 > rosti> Yar Tikhiy wrote: > > rosti> I forgot that a "search" resolver(5) parameter is useless for reverse > rosti> resolving. But that "doubling" of name->IP requests with an empty (or > rosti> root, according to resolver(5)) domain in the "search" is still a bug, > rosti> IMHO. Although it shouldn't affect the sshd. > > I looked BIND9's resolver, and took the related part into our > resolver. However, it seems to me that there is still same issue in > BIND9's resolver. So, I change more bit. Please try the following > patch and let me know the result: Your patch fixed the problem, thank you. But during my tests I've found another form of "doubling" bug in getaddrinfo(). To test the getaddrinfo() behavior I used a program that is attached to this email. If hints.ai_socktype == 0 then the getaddrinfo() does the lookup twice, even if DNS is reachable. If the latter is the case, returned linked list is twice as large than it should be. The hints.ai_socktype seems to have the same influence when hints.ai_family is PF_INET6 or PF_UNSPEC too. --Multipart=_Thu__23_Feb_2006_23_57_27_+0200_tlC6au_hl+CwgArA--