]> 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)
committerMichał Kępień <michal@isc.org>
Thu, 7 May 2026 11:09:18 +0000 (13:09 +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 3401cbd16f44b4ecb8b57dc9d1951037db6d0e32)

lib/ns/client.c

index c10b1226295c3f2e9db0589ff84a5fc60fe40b74..4ee94289d51a029b0c85f3a799e8a900c63ab9c7 100644 (file)
@@ -2097,7 +2097,7 @@ ns_client_request(isc_nmhandle_t *handle, isc_result_t eresult,
        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),
                              "invalid message class: %s", classbuf);
@@ -2195,7 +2195,7 @@ ns_client_request_continue(void *arg) {
                        dns_rdataclass_format(client->message->rdclass,
                                              classname, sizeof(classname));
 
-                       ns_client_dumpmessage(client, NULL);
+                       ns_client_dumpmessage(client, "");
                        ns_client_log(client, NS_LOGCATEGORY_CLIENT,
                                      NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(1),
                                      "no matching view in class '%s'",