From 01c78f3fc6c8a985289bf998a21fefdc4139b356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 6 May 2026 10:12:35 +0200 Subject: [PATCH] Pass empty string instead of NULL to ns_client_dumpmessage() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ns/client.c b/lib/ns/client.c index 8680cd6c47..88327fbc7b 100644 --- a/lib/ns/client.c +++ b/lib/ns/client.c @@ -2139,7 +2139,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); @@ -2177,7 +2177,7 @@ ns__client_request(isc_nmhandle_t *handle, isc_result_t eresult, 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_extendederror(client, DNS_EDE_PROHIBITED, NULL); ns_client_error(client, notimp ? DNS_R_NOTIMP : DNS_R_REFUSED); return;