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.
This commit is contained in:
Colin Vidal 2025-10-31 12:16:54 +01:00
parent 90b4f256a7
commit 59f116fbc9

View 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);