From owner-freebsd-net@FreeBSD.ORG  Sat Feb 18 18:06:53 2006
Return-Path: <owner-freebsd-net@FreeBSD.ORG>
X-Original-To: freebsd-net@freebsd.org
Delivered-To: freebsd-net@freebsd.org
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id B9D8216A420
	for <freebsd-net@freebsd.org>; Sat, 18 Feb 2006 18:06:53 +0000 (GMT)
	(envelope-from rosti.bsd@gmail.com)
Received: from uproxy.gmail.com (uproxy.gmail.com [66.249.92.194])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 058FD43D48
	for <freebsd-net@freebsd.org>; Sat, 18 Feb 2006 18:06:52 +0000 (GMT)
	(envelope-from rosti.bsd@gmail.com)
Received: by uproxy.gmail.com with SMTP id u40so394790ugc
	for <freebsd-net@freebsd.org>; Sat, 18 Feb 2006 10:06:51 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com;
	h=received:date:from:to:subject:message-id:x-mailer:mime-version:content-type:content-transfer-encoding;
	b=dDXZTmSMkV2t+/hDVY2wssFsjVEK9skfLRWIji8NaRW9Dys9XME7JTzCsS5uFTR0Y3QGR5oVezhP92nNcMbz56ICpe9xXvN/QygI1QVmo6L14s1DM7rjNsm+y6YA2JatD21RZWZ/ZqghxZwx9pJvbwM89C2QRnlYNLhhOf0xe9o=
Received: by 10.66.250.9 with SMTP id x9mr1805898ugh;
	Sat, 18 Feb 2006 10:06:40 -0800 (PST)
Received: from saturn.lan ( [212.143.154.227])
	by mx.gmail.com with ESMTP id k1sm2050166ugf.2006.02.18.10.06.26;
	Sat, 18 Feb 2006 10:06:40 -0800 (PST)
Date: Sat, 18 Feb 2006 20:05:34 +0200
From: Rostislav Krasny <rosti.bsd@gmail.com>
To: freebsd-net@freebsd.org
Message-Id: <20060218200534.7e6bc04b.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
Subject: RES_DFLRETRY in resolv.h
X-BeenThere: freebsd-net@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Networking and TCP/IP with FreeBSD <freebsd-net.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-net>,
	<mailto:freebsd-net-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-net>
List-Post: <mailto:freebsd-net@freebsd.org>
List-Help: <mailto:freebsd-net-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-net>,
	<mailto:freebsd-net-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 18 Feb 2006 18:06:53 -0000

Hi,

According to resolver(5) manual page the number of times the resolver
will send a query to each of its name servers before giving up and
returning an error to the calling application is a RES_DFLRETRY defined
in resolv.h. For years FreeBSD had no RES_DFLRETRY macro defined in
resolv.h and had used a hardcoded constant, until Yar Tikhiy fixed it:

http://docs.freebsd.org/cgi/mid.cgi?200409091739.i89HdlwM019548
http://docs.freebsd.org/cgi/mid.cgi?200409091742.i89HgIan019681
http://docs.freebsd.org/cgi/mid.cgi?200409091719.i89HJRGu019026

Other systems and BIND9's internal resolver define the RES_DFLRETRY
as 2, but in FreeBSD that macro is 4. Why it's so big? I think it had
been inherited from old BIND4's resolver. Could the RES_DFLRETRY be
decreased from 4 to 2 ?

Current value of RES_DFLRETRY can make host unreachable. Read a
bin/62139 PR and "SSH login takes very long time...sometimes" threads on
freebsd-stable mailing list.

Thanks