From: Otto Moerbeek Date: Tue, 16 Dec 2025 11:49:55 +0000 (+0100) Subject: rec: Print irrelevent entries in cookie dump more nicely X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16651%2Fhead;p=thirdparty%2Fpdns.git rec: Print irrelevent entries in cookie dump more nicely Signed-off-by: Otto Moerbeek --- diff --git a/pdns/recursordist/rec-cookiestore.cc b/pdns/recursordist/rec-cookiestore.cc index 8b660496bf..7477fd20d4 100644 --- a/pdns/recursordist/rec-cookiestore.cc +++ b/pdns/recursordist/rec-cookiestore.cc @@ -47,8 +47,9 @@ uint64_t CookieStore::dump(int fileDesc) const count++; timebuf_t tmp; fprintf(filePtr.get(), "%s\t%s\t%s\t%s\t%s\n", - entry.d_address.toStringWithPortExcept(53).c_str(), entry.d_localaddress.toString().c_str(), - entry.d_cookie.toDisplayString().c_str(), + entry.d_address.toStringWithPortExcept(53).c_str(), + entry.d_localaddress.isUnspecified() ? "-" : entry.d_localaddress.toString().c_str(), + entry.d_support == CookieEntry::Support::Unsupported ? "-" : entry.d_cookie.toDisplayString().c_str(), CookieEntry::toString(entry.d_support).c_str(), entry.d_lastused == std::numeric_limits::max() ? "Forever" : timestamp(entry.d_lastused, tmp)); }