]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
support EDE 24 (Invalid Data)
authorColin Vidal <colin@isc.org>
Fri, 31 Oct 2025 11:16:54 +0000 (12:16 +0100)
committerColin Vidal <colin@isc.org>
Mon, 3 Nov 2025 16:34:25 +0000 (17:34 +0100)
Extended DNS Error 24 (Invalid Data) is returned when the server cannot
answer data for a zone it is configured for. This occurs typically when
an authoritative server does not have loaded the DB of a configured
zone, or a secondary server zone is expired.

See RFC 8914 section 4.25.

lib/ns/query.c

index b9bd2b892a69e13e6b024a104de6f9a5565f1b27..2a8f587bbf898e6d74112b7a33dce6588149b2d7 100644 (file)
@@ -5635,8 +5635,19 @@ ns__query_start(query_ctx_t *qctx) {
                                QUERY_ERROR(qctx, DNS_R_REFUSED);
                        }
                } else {
+                       const char *edemsg = NULL;
+
                        CCTRACE(ISC_LOG_ERROR, "ns__query_start: query_getdb "
                                               "failed");
+
+                       if (result == DNS_R_NOTLOADED) {
+                               edemsg = "zone not loaded";
+                       } else if (result == DNS_R_EXPIRED) {
+                               edemsg = "zone expired";
+                       }
+                       dns_ede_add(&qctx->client->edectx, DNS_EDE_INVALIDDATA,
+                                   edemsg);
+
                        QUERY_ERROR(qctx, result);
                }
                return ns_query_done(qctx);