Commit fc0fc9363f for bind
commit fc0fc9363f9b96feb4bf94d482dca13211479b42
Author: Aram Sargsyan <aram@isc.org>
Date: Tue Dec 1 19:57:48 2026 +0000
Fail the fetch when referral reaches fetches-per-zone limit
When a fetch hits a referral and the zone it points to has reached its
fetches-per-zone limit, fail the fetch in rctx_answer() as there is no
other server to try next.
diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c
index 0ef4105f4c..a9565657a5 100644
--- a/lib/dns/resolver.c
+++ b/lib/dns/resolver.c
@@ -8582,6 +8582,17 @@ rctx_answer(respctx_t *rctx) {
return result;
}
result = ISC_R_SUCCESS;
+ } else if (result == ISC_R_QUOTA) {
+ /*
+ * This was a referral, but the zone it points
+ * to has reached its fetches-per-zone limit.
+ * rctx_referral() has already dropped the
+ * current delegation from the fetch context, so
+ * there is no other server to try; fail the
+ * fetch as resquery_response_continue() does.
+ */
+ rctx_done(rctx, result);
+ return ISC_R_COMPLETE;
} else {
/*
* At this point, AA is not set, the response