24159a
From 9f9ce5d91a944407e13360e9c92c090d23777a8b Mon Sep 17 00:00:00 2001
24159a
From: Mark Andrews <marka@isc.org>
24159a
Date: Fri, 27 May 2016 18:39:33 +1000
24159a
Subject: [PATCH] fix merge error
24159a
24159a
---
24159a
 bin/named/query.c | 31 +++++++++++++++++++++++++++++++
24159a
 1 file changed, 31 insertions(+)
24159a
24159a
diff --git a/bin/named/query.c b/bin/named/query.c
24159a
index 6e988f5686..2c44e9ff53 100644
24159a
--- a/bin/named/query.c
24159a
+++ b/bin/named/query.c
24159a
@@ -7195,6 +7195,37 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
24159a
 		 * we know the answer.
24159a
 		 */
24159a
 
24159a
+		/*
24159a
+		 * If we have a zero ttl from the cache refetch it.
24159a
+		 */
24159a
+		if (!is_zone && event == NULL && rdataset->ttl == 0 &&
24159a
+		    RECURSIONOK(client))
24159a
+		{
24159a
+			if (dns_rdataset_isassociated(rdataset))
24159a
+				dns_rdataset_disassociate(rdataset);
24159a
+			if (sigrdataset != NULL &&
24159a
+			    dns_rdataset_isassociated(sigrdataset))
24159a
+				dns_rdataset_disassociate(sigrdataset);
24159a
+			if (node != NULL)
24159a
+				dns_db_detachnode(db, &node);
24159a
+
24159a
+			result = query_recurse(client, qtype,
24159a
+					       client->query.qname,
24159a
+					       NULL, NULL, resuming);
24159a
+			if (result == ISC_R_SUCCESS) {
24159a
+				client->query.attributes |=
24159a
+					NS_QUERYATTR_RECURSING;
24159a
+				if (dns64)
24159a
+					client->query.attributes |=
24159a
+						NS_QUERYATTR_DNS64;
24159a
+				if (dns64_exclude)
24159a
+					client->query.attributes |=
24159a
+					      NS_QUERYATTR_DNS64EXCLUDE;
24159a
+			} else
24159a
+				RECURSE_ERROR(result);
24159a
+			goto cleanup;
24159a
+		}
24159a
+
24159a
 #ifdef ALLOW_FILTER_AAAA_ON_V4
24159a
 		/*
24159a
 		 * Optionally hide AAAAs from IPv4 clients if there is an A.
24159a
-- 
24159a
2.14.4
24159a