From: Otto Moerbeek Date: Wed, 23 Mar 2022 12:48:52 +0000 (+0100) Subject: Only log "Unable to send NOD lookup" if log-common-errors is set X-Git-Tag: rec-4.7.0-beta1~34^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2e511a5ddb9af72623e5971b51fcc28de5354d69;p=thirdparty%2Fpdns.git Only log "Unable to send NOD lookup" if log-common-errors is set Fixes #11440. --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index c696a76703..4ee91d60e6 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -579,7 +579,9 @@ static void sendNODLookup(const shared_ptr& nodlogger, const DNSNa qname = dname + g_nodLookupDomain; } catch (const std::range_error& e) { - nodlogger->v(10)->error(Logr::Error, "DNSName too long", "Unable to send NOD lookup"); + if (g_logCommonErrors) { + nodlogger->v(10)->error(Logr::Error, "DNSName too long", "Unable to send NOD lookup"); + } ++g_stats.nodLookupsDroppedOversize; return; }