Permalink
Browse files

log answer packets only if log-dns-details is enabled

  • Loading branch information...
1 parent 55bb6a2 commit 1ad4e4451a087eca1d7f1776694342f84777fdbc @mind04 mind04 committed with mind04 Aug 26, 2015
Showing with 2 additions and 1 deletion.
  1. +2 −1 pdns/packethandler.cc
@@ -989,7 +989,8 @@ DNSPacket *PacketHandler::questionOrRecurse(DNSPacket *p, bool *shouldRecurse)
bool noCache=false;
if(p->d.qr) { // QR bit from dns packet (thanks RA from N)
- L<<Logger::Error<<"Received an answer (non-query) packet from "<<p->getRemote()<<", dropping"<<endl;
+ if(d_logDNSDetails)
+ L<<Logger::Error<<"Received an answer (non-query) packet from "<<p->getRemote()<<", dropping"<<endl;
S.inc("corrupt-packets");
S.ringAccount("remotes-corrupt", p->getRemote());
return 0;

0 comments on commit 1ad4e44

Please sign in to comment.