]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Log dropped or slipped responses in the query-errors category
authorAram Sargsyan <aram@isc.org>
Mon, 30 Jun 2025 13:12:09 +0000 (13:12 +0000)
committerArаm Sаrgsyаn <aram@isc.org>
Thu, 10 Jul 2025 08:20:17 +0000 (08:20 +0000)
As mentioned in the comments block before the changed code block,
the dropped or slipped responses should be logged in the query
category (or rather query-errors category as done in lib/ns/client.c),
so that requests are not silently lost.

Also fix a couple of errors/typos in the code comments.

lib/ns/client.c
lib/ns/query.c

index 92c6172c7bfaeb4c74e7d5cf9db1588326090499..ba30d4a41775f16d46b8751dee7e322f3dd779f6 100644 (file)
@@ -938,10 +938,10 @@ ns_client_error(ns_client_t *client, isc_result_t result) {
                        wouldlog, log_buf, sizeof(log_buf));
                if (rrl_result != DNS_RRL_RESULT_OK) {
                        /*
-                        * Log dropped errors in the query category
+                        * Log dropped errors in the query-errors category
                         * so that they are not lost in silence.
                         * Starts of rate-limited bursts are logged in
-                        * NS_LOGCATEGORY_RRL.
+                        * DNS_LOGCATEGORY_RRL.
                         */
                        if (wouldlog) {
                                ns_client_log(client,
index 3de9454d30af63725a785adfdf4300d02f2851f1..fed317163604a413fe89f62a1eebbb94ec90ae41 100644 (file)
@@ -6945,7 +6945,7 @@ query_checkrrl(query_ctx_t *qctx, isc_result_t result) {
                        sizeof(log_buf));
                if (rrl_result != DNS_RRL_RESULT_OK) {
                        /*
-                        * Log dropped or slipped responses in the query
+                        * Log dropped or slipped responses in the query-errors
                         * category so that requests are not silently lost.
                         * Starts of rate-limited bursts are logged in
                         * DNS_LOGCATEGORY_RRL.
@@ -6955,7 +6955,8 @@ query_checkrrl(query_ctx_t *qctx, isc_result_t result) {
                         * with other truncated responses in RespTruncated.
                         */
                        if (wouldlog) {
-                               ns_client_log(qctx->client, DNS_LOGCATEGORY_RRL,
+                               ns_client_log(qctx->client,
+                                             NS_LOGCATEGORY_QUERY_ERRORS,
                                              NS_LOGMODULE_QUERY,
                                              DNS_RRL_LOG_DROP, "%s", log_buf);
                        }