From 2dc26ebdb625de3a66c0bbd90fd3983a62f8e741 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 23 Jul 2020 09:47:49 +1000 Subject: [PATCH] Map DNS_R_BADTSIG to FORMERR Now that the log message has been printed set the result code to DNS_R_FORMERR. We don't do this via dns_result_torcode() as we don't want upstream errors to produce FORMERR if that processing end with DNS_R_BADTSIG. (cherry picked from commit 20488d6ad36c7b48f043e583ff32eb14ca52f035) --- lib/ns/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ns/client.c b/lib/ns/client.c index ce6059af69..bc409a251d 100644 --- a/lib/ns/client.c +++ b/lib/ns/client.c @@ -1811,7 +1811,7 @@ ns__client_request(isc_nmhandle_t *handle, isc_region_t *region, void *arg) { NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(1), "message parsing failed: %s", isc_result_totext(result)); - if (result == ISC_R_NOSPACE) { + if (result == ISC_R_NOSPACE || result == DNS_R_BADTSIG) { result = DNS_R_FORMERR; } ns_client_error(client, result);