Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Oct 2006 00:59:48 +0900
From:      Hajimu UMEMOTO <ume@FreeBSD.org>
To:        =?ISO-8859-1?Q?G=E1bor_K=F6vesd=E1n?= <gabor@FreeBSD.org>
Cc:        freebsd-current@FreeBSD.org, "Ion-Mihai \"IOnut\" Tetcu" <itetcu@FreeBSD.org>, "Simon L. Nielsen" <simon@FreeBSD.org>
Subject:   Re: Resolver not always resolving hostnames
Message-ID:  <ygeac3oz6h7.wl%ume@mahoroba.org>
In-Reply-To: <453B5F3A.3030804@FreeBSD.org>
References:  <20061022095811.GA10743@zaphod.nitro.dk> <20061022132225.13299ae6@it.buh.tecnik93.com> <ygefydgzi52.wl%ume@mahoroba.org> <453B5F3A.3030804@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

>>>>> On Sun, 22 Oct 2006 14:08:26 +0200
>>>>> G=E1bor K=F6vesd=E1n <gabor@FreeBSD.org> said:

gabor> options attempts: 4 is the correct form and it did help to me. Thank=
s.

I found the timeout related fix in bind-9.3.3rc2:

> 2005.	[bug]		libbind: Retransmission timeouts should be
>			based on which attempt it is to the nameserver
>			and not the nameserver itself. [RT #13548]

It may solve your problem.  So, could you try this patch, instead?

Index: lib/libc/resolv/res_send.c
diff -u -p lib/libc/resolv/res_send.c.orig lib/libc/resolv/res_send.c
--- lib/libc/resolv/res_send.c.orig	Tue Aug  8 04:14:55 2006
+++ lib/libc/resolv/res_send.c	Mon Oct 23 00:36:41 2006
@@ -145,7 +145,7 @@ static int		send_dg(res_state,
 				int kq,
 #endif
 				const u_char *, int,
-				u_char *, int, int *, int,
+				u_char *, int, int *, int, int,
 				int *, int *);
 static void		Aerror(const res_state, FILE *, const char *, int,
 			       const struct sockaddr *, int);
@@ -490,7 +490,7 @@ res_nsend(res_state statp,
 				    kq,
 #endif
 				    buf, buflen, ans, anssiz, &terrno,
-				    ns, &v_circuit, &gotsomewhere);
+				    ns, try, &v_circuit, &gotsomewhere);
 			if (n < 0)
 				goto fail;
 			if (n =3D=3D 0)
@@ -812,8 +812,9 @@ send_dg(res_state statp,
 #ifdef USE_KQUEUE
 	int kq,
 #endif
-	const u_char *buf, int buflen, u_char *ans, int anssiz,
-	int *terrno, int ns, int *v_circuit, int *gotsomewhere)
+	const u_char *buf, int buflen, u_char *ans,
+	int anssiz, int *terrno, int ns, int try, int *v_circuit,
+	int *gotsomewhere)
 {
 	const HEADER *hp =3D (const HEADER *) buf;
 	HEADER *anhp =3D (HEADER *) ans;
@@ -914,7 +915,7 @@ send_dg(res_state statp,
 	/*
 	 * Wait for reply.
 	 */
-	seconds =3D (statp->retrans << ns);
+	seconds =3D (statp->retrans << try);
 	if (ns > 0)
 		seconds /=3D statp->nscount;
 	if (seconds <=3D 0)


Sincerely,

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ygeac3oz6h7.wl%ume>