From: Remi Gacogne Date: Mon, 8 Jun 2026 13:54:29 +0000 (+0200) Subject: dnsdist: Log packet bytes after failing to parse a CNAME from them X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a90f9c58fa0baad2c85178db7df5ab855c5bb7fb;p=thirdparty%2Fpdns.git dnsdist: Log packet bytes after failing to parse a CNAME from them Signed-off-by: Remi Gacogne --- diff --git a/pdns/dnsdistdist/dnsdist-lua-ffi.cc b/pdns/dnsdistdist/dnsdist-lua-ffi.cc index 0362666171..fed1635520 100644 --- a/pdns/dnsdistdist/dnsdist-lua-ffi.cc +++ b/pdns/dnsdistdist/dnsdist-lua-ffi.cc @@ -1940,8 +1940,8 @@ size_t dnsdist_ffi_dnspacket_get_name_at_offset_raw(const char* packet, size_t p return storage.size(); } catch (const std::exception& e) { - VERBOSESLOG(infolog("Error parsing DNSName via dnsdist_ffi_dnspacket_get_name_at_offset_raw: %s", e.what()), - getLogger(__func__)->error(Logr::Info, e.what(), "Error parsing DNS name", "packet_size", Logging::Loggable(packetSize), "offset", Logging::Loggable(offset))); + VERBOSESLOG(infolog("Error parsing DNSName from packet (%s) via dnsdist_ffi_dnspacket_get_name_at_offset_raw: %s", makeHexDump(std::string(packet, packetSize)), e.what()), + getLogger(__func__)->error(Logr::Info, e.what(), "Error parsing DNS name", "packet_size", Logging::Loggable(packetSize), "offset", Logging::Loggable(offset), "packet_bytes", Logging::Loggable(makeHexDump(std::string(packet, packetSize))))); } return 0; }