From: Colin Vidal Date: Fri, 31 Oct 2025 11:16:54 +0000 (+0100) Subject: support EDE 24 (Invalid Data) X-Git-Tag: v9.21.15~10^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59f116fbc94f4fea01bd659d3e79502108cb55ab;p=thirdparty%2Fbind9.git support EDE 24 (Invalid Data) 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. --- diff --git a/lib/ns/query.c b/lib/ns/query.c index b9bd2b892a6..2a8f587bbf8 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -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);