Blame SOURCES/bind99-rh1291185.patch

900526
diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c
900526
index 8696b15..5ef2dd6 100644
900526
--- a/lib/dns/resolver.c
900526
+++ b/lib/dns/resolver.c
900526
@@ -7373,9 +7373,12 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
900526
 		 * NXDOMAIN, NXRDATASET, or referral.
900526
 		 */
900526
 		result = noanswer_response(fctx, NULL, 0);
900526
-		if (result == DNS_R_CHASEDSSERVERS) {
900526
-		} else if (result == DNS_R_DELEGATION) {
900526
-		force_referral:
900526
+		switch (result) {
900526
+		case ISC_R_SUCCESS:
900526
+		case DNS_R_CHASEDSSERVERS:
900526
+			break;
900526
+		case DNS_R_DELEGATION:
900526
+ force_referral:
900526
 			/*
900526
 			 * We don't have the answer, but we know a better
900526
 			 * place to look.
900526
@@ -7400,7 +7403,8 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
900526
 			fctx->adberr = 0;
900526
 
900526
 			result = ISC_R_SUCCESS;
900526
-		} else if (result != ISC_R_SUCCESS) {
900526
+			break;
900526
+		default:
900526
 			/*
900526
 			 * Something has gone wrong.
900526
 			 */
900526
diff --git a/lib/dns/view.c b/lib/dns/view.c
900526
index 142b09e..35900b3 100644
900526
--- a/lib/dns/view.c
900526
+++ b/lib/dns/view.c
900526
@@ -1216,6 +1216,7 @@ dns_view_findzonecut2(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
900526
 	dns_name_t *zfname;
900526
 	dns_rdataset_t zrdataset, zsigrdataset;
900526
 	dns_fixedname_t zfixedname;
900526
+	unsigned int ztoptions = 0;
900526
 
900526
 #ifndef BIND9
900526
 	UNUSED(zone);
900526
@@ -1242,9 +1243,12 @@ dns_view_findzonecut2(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
900526
 #ifdef BIND9
900526
 	zone = NULL;
900526
 	LOCK(&view->lock);
900526
-	if (view->zonetable != NULL)
900526
-		result = dns_zt_find(view->zonetable, name, 0, NULL, &zone);
900526
-	else
900526
+	if (view->zonetable != NULL) {
900526
+		if ((options & DNS_DBFIND_NOEXACT) != 0)
900526
+			ztoptions |= DNS_ZTFIND_NOEXACT;
900526
+		result = dns_zt_find(view->zonetable, name, ztoptions,
900526
+				     NULL, &zone);
900526
+	} else
900526
 		result = ISC_R_NOTFOUND;
900526
 	if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH)
900526
 		result = dns_zone_getdb(zone, &db);