From 7170458302edc3364ea36c7a5ed3386193ba3215 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: Mon, 29 Dec 2008 23:50:35 +0000 Subject: [PATCH] 2516. [bug] glue sort for responses was performed even when not needed. [RT #19039] --- CHANGES | 3 +++ bin/named/query.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 102153804e..21ca07b4e7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +2516. [bug] glue sort for responses was performed even when not + needed. [RT #19039] + 2514. [bug] dig/host failed with -4 or -6 when resolv.conf contains a nameserver of the excluded address family. [RT #18848] diff --git a/bin/named/query.c b/bin/named/query.c index cacd70acbb..307986a37b 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: query.c,v 1.313 2008/11/03 23:57:22 marka Exp $ */ +/* $Id: query.c,v 1.313.20.1 2008/12/29 23:50:35 jinmei Exp $ */ /*! \file */ @@ -4856,7 +4856,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype) * is in the glue sort it to the start of the additional * section. */ - if (client->message->counts[DNS_SECTION_ANSWER] == 0 && + if (ISC_LIST_EMPTY(client->message->sections[DNS_SECTION_ANSWER]) && client->message->rcode == dns_rcode_noerror && (qtype == dns_rdatatype_a || qtype == dns_rdatatype_aaaa)) answer_in_glue(client, qtype);