]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Keep RRL ncache fixed name alive 12096/head
authorAlessio Podda <alessio@isc.org>
Sun, 24 May 2026 11:12:11 +0000 (13:12 +0200)
committerAlessio Podda <alessio@isc.org>
Tue, 16 Jun 2026 09:56:59 +0000 (11:56 +0200)
Move the fixed name storage out of the NCACHE branch so the name passed to
dns_rrl() remains valid for cached NXDOMAIN responses.

lib/ns/query.c

index 4fd70e6fbcdbeea5763e74a26033221e7e1dde9e..0821050c2269b7e6b60db4954820ff18393f6f6f 100644 (file)
@@ -6839,6 +6839,7 @@ query_checkrrl(query_ctx_t *qctx, isc_result_t result) {
        {
                bool wouldlog;
                const dns_name_t *constname;
+               dns_fixedname_t constname_fixed;
                char log_buf[DNS_RRL_LOG_BUF_LEN];
                isc_result_t resp_result;
                dns_rrl_result_t rrl_result;
@@ -6864,8 +6865,8 @@ query_checkrrl(query_ctx_t *qctx, isc_result_t result) {
                         * Try to use owner name in the negative cache SOA.
                         */
                        dns_rdataset_t nc_rdataset = DNS_RDATASET_INIT;
-                       dns_fixedname_t fixed;
-                       dns_name_t *n = dns_fixedname_initname(&fixed);
+                       dns_name_t *n =
+                               dns_fixedname_initname(&constname_fixed);
                        DNS_RDATASET_FOREACH(qctx->rdataset) {
                                dns_ncache_current(qctx->rdataset, n,
                                                   &nc_rdataset);