Permalink
Browse files

send empty SERVFAIL on exeeded retargetcount and log failures

  • Loading branch information...
1 parent 5584bca commit dfd1b82cc9fc45c2a1729a848ac870e81eec2f07 @mind04 mind04 committed with Habbie Aug 28, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 pdns/packethandler.cc
@@ -1206,6 +1206,9 @@ DNSPacket *PacketHandler::questionOrRecurse(DNSPacket *p, bool *shouldRecurse)
retargeted:;
if(retargetcount > 10) { // XXX FIXME, retargetcount++?
+ L<<Logger::Warning<<"Abort CNAME chain resolution after "<<--retargetcount<<" redirects, sending out servfail. Initial query: '"<<p->qdomain<<"'"<<endl;
+ delete r;
+ r=p->replyPacket();
r->setRcode(RCode::ServFail);
return r;
}

0 comments on commit dfd1b82

Please sign in to comment.