From owner-freebsd-stable@FreeBSD.ORG Fri Feb 24 13:52:13 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 565CA16A422 for ; Fri, 24 Feb 2006 13:52:13 +0000 (GMT) (envelope-from rosti.bsd@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09D1E43D62 for ; Fri, 24 Feb 2006 13:52:01 +0000 (GMT) (envelope-from rosti.bsd@gmail.com) Received: by zproxy.gmail.com with SMTP id z6so353102nzd for ; Fri, 24 Feb 2006 05:52:01 -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:content-transfer-encoding; b=P2h+Gkkcx1ubWavHJ/TFfUs+faz15oGFMykPnvxDdjRRRVbF+9H10CQbp6ZnUNsDMBavdunBEn4WY/iyOV/trV8yfMSsJT6IQ42ZlQeBICnU/em8jpmXXHxDsN55uYmY51rdeBRo2DD1ubYhtqCBPJrQJzwLAVeTK1uassQQmIs= Received: by 10.64.153.11 with SMTP id a11mr2199460qbe; Fri, 24 Feb 2006 05:52:00 -0800 (PST) Received: from saturn.lan ( [212.143.154.227]) by mx.gmail.com with ESMTP id e17sm684105qbe.2006.02.24.05.51.55; Fri, 24 Feb 2006 05:52:00 -0800 (PST) Date: Fri, 24 Feb 2006 15:51:53 +0200 From: Rostislav Krasny To: Hajimu UMEMOTO Message-Id: <20060224155153.f7da1a52.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> <20060223235727.33cddb13.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: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Fri, 24 Feb 2006 13:52:13 -0000 On Fri, 24 Feb 2006 11:50:25 +0900 Hajimu UMEMOTO wrote: > Hi, Hello > >>>>> 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. Excellent! What about RES_DFLRETRY decreasing from 4 to 2? Does it need more testing or discussion? > 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. Ok. It was just not clear when I read the manual and saw, by tcpdump, two for example 'A? yahoo.com.' requests to a reachable DNS.