2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

prevent query_coveringnsec() from running twice

when synthesizing a new CNAME, we now check whether the target
matches the query already being processed. if so, we do not
restart the query; this prevents a waste of resources.

(cherry picked from commit 0ae8b2e056)
This commit is contained in:
Evan Hunt
2023-05-18 22:02:06 -07:00
parent d6ba9b3ed5
commit 07f6c63a80

View File

@@ -10009,6 +10009,12 @@ query_synthcnamewildcard(query_ctx_t *qctx, dns_rdataset_t *rdataset,
RUNTIME_CHECK(result == ISC_R_SUCCESS);
dns_rdata_reset(&rdata);
if (dns_name_equal(qctx->client->query.qname, &cname.cname)) {
dns_message_puttempname(qctx->client->message, &tname);
dns_rdata_freestruct(&cname);
return (ISC_R_SUCCESS);
}
dns_name_copy(&cname.cname, tname);
dns_rdata_freestruct(&cname);