]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Map DNS_R_BADTSIG to FORMERR
authorMark Andrews <marka@isc.org>
Wed, 22 Jul 2020 23:47:49 +0000 (09:47 +1000)
committerMark Andrews <marka@isc.org>
Tue, 4 Aug 2020 13:07:02 +0000 (23:07 +1000)
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)

bin/named/client.c

index 9a0d3c800909e440778e54c4d9aa2a2990a98985..f4a5ff9f9b1d5fc634636e2c7f2257e91e33b01c 100644 (file)
@@ -2685,7 +2685,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
                              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);