From 211e0a6fc2aa26bba678e2ac43ea9ec746a67105 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Fri, 10 Dec 1999 17:31:08 +0000 Subject: [PATCH] the TC bit was only checked in messages that ended prematurely; it should be checked always --- lib/dns/resolver.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index a2f0e208fc..b163035c7a 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -2783,9 +2783,17 @@ resquery_response(isc_task_t *task, isc_event_t *event) { /* * Deal with truncated responses by retrying using TCP. */ + if ((message->flags & DNS_MESSAGEFLAG_TC) != 0) + truncated = ISC_TRUE; + if (truncated) { - options |= DNS_FETCHOPT_TCP; - resend = ISC_TRUE; + if ((options & DNS_FETCHOPT_TCP) != 0) { + broken_server = ISC_TRUE; + keep_trying = ISC_TRUE; + } else { + options |= DNS_FETCHOPT_TCP; + resend = ISC_TRUE; + } goto done; }