]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Pass empty string instead of NULL to ns_client_dumpmessage()
authorOndřej Surý <ondrej@isc.org>
Wed, 6 May 2026 08:12:35 +0000 (10:12 +0200)
committerOndřej Surý <ondrej@isc.org>
Thu, 7 May 2026 13:14:06 +0000 (15:14 +0200)
The two new call sites added by the CLASS-validation work passed NULL
as the reason, but ns_client_dumpmessage() bails out early on a NULL
reason — so the message dump never happened. The intent was to dump
the message and let the follow-up ns_client_log() carry the reason
text, so pass "" to suppress the prefix without short-circuiting the
dump.

(cherry picked from commit 8af39c360407a92ef31bf233b9df760d1bb9fb5f)

bin/named/client.c

index dddb2a63faeec9948265c8f0b474d3866c9d11aa..dc5e112187b3e3da6f7b7e9558a407eae57f1bab 100644 (file)
@@ -2887,7 +2887,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
        default:
                dns_rdataclass_format(client->message->rdclass, classbuf,
                                      sizeof(classbuf));
-               ns_client_dumpmessage(client, NULL);
+               ns_client_dumpmessage(client, "");
                ns_client_log(client, NS_LOGCATEGORY_CLIENT,
                              NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(1),
                              "message class could not be determined");
@@ -3013,7 +3013,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
                ns_client_log(client, NS_LOGCATEGORY_CLIENT,
                              NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(1),
                              "no matching view in class '%s'", classname);
-               ns_client_dumpmessage(client, NULL);
+               ns_client_dumpmessage(client, "");
                ns_client_error(client, notimp ? DNS_R_NOTIMP : DNS_R_REFUSED);
                goto cleanup;
        }