]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Restore dns64 state during serve-stale processing
authorMark Andrews <marka@isc.org>
Thu, 12 Oct 2023 01:01:46 +0000 (12:01 +1100)
committerMichał Kępień <michal@isc.org>
Fri, 5 Jan 2024 11:17:00 +0000 (12:17 +0100)
If we are in the process of looking for the A records as part of
dns64 processing and the server-stale timeout triggers, redo the
dns64 changes that had been made to the orignal qctx.

lib/ns/query.c

index 07537a8040b1179e39f5df40b0c95c518e2f6f62..b819dc4fdf176de25657778c751505fa22b3bd65 100644 (file)
@@ -6251,6 +6251,13 @@ query_lookup_stale(ns_client_t *client) {
        query_ctx_t qctx;
 
        qctx_init(client, NULL, client->query.qtype, &qctx);
+       if (DNS64(client)) {
+               qctx.qtype = qctx.type = dns_rdatatype_a;
+               qctx.dns64 = true;
+       }
+       if (DNS64EXCLUDE(client)) {
+               qctx.dns64_exclude = true;
+       }
        dns_db_attach(client->view->cachedb, &qctx.db);
        client->query.attributes &= ~NS_QUERYATTR_RECURSIONOK;
        client->query.dboptions |= DNS_DBFIND_STALETIMEOUT;