From 089fadee8e22dc837f649ab2e83e5ee0d02c25fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tatuya=20JINMEI=20=E7=A5=9E=E6=98=8E=E9=81=94=E5=93=89?= Date: Fri, 17 Oct 2008 22:03:37 +0000 Subject: [PATCH] 2468. [bug] Resolver could try unreachable servers multiple times. [RT #18739] --- CHANGES | 3 +++ lib/dns/resolver.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index cdb21afd10..fc77112724 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +2468. [bug] Resolver could try unreachable servers multiple times. + [RT #18739] + 2467. [bug] Failure of fcntl(F_DUPFD) wasn't logged. [RT #18740] 2465. [bug] Adb's handling of lame addresses was different diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index a4b01fbae3..3a02ba798e 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: resolver.c,v 1.218.2.18.4.84 2008/07/24 05:01:50 jinmei Exp $ */ +/* $Id: resolver.c,v 1.218.2.18.4.85 2008/10/17 22:03:37 jinmei Exp $ */ #include @@ -363,6 +363,8 @@ static isc_result_t ncache_adderesult(dns_message_t *message, isc_result_t *eresultp); static void validated(isc_task_t *task, isc_event_t *event); static void maybe_destroy(fetchctx_t *fctx); +static void add_bad(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo, + isc_result_t reason); static isc_result_t valcreate(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo, dns_name_t *name, @@ -873,6 +875,7 @@ process_sendevent(resquery_t *query, isc_event_t *event) { /* * No route to remote. */ + add_bad(fctx, query->addrinfo, sevent->result); fctx_cancelquery(&query, NULL, NULL, ISC_TRUE); retry = ISC_TRUE; break;