Skip to content

Commit

Permalink
send empty SERVFAIL on exeeded retargetcount and log failures
Browse files Browse the repository at this point in the history
  • Loading branch information
mind04 authored and Peter van Dijk committed Nov 26, 2013
1 parent 5584bca commit dfd1b82
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pdns/packethandler.cc
Expand Up @@ -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;
}
Expand Down

0 comments on commit dfd1b82

Please sign in to comment.