Permalink
Browse files

Added warning if trailing dot is used.

  • Loading branch information...
1 parent aa0976b commit 2b18bcf3d9c38e415121f609d121e5ffa142cf72 @cmouse cmouse committed May 28, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 pdns/packethandler.cc
@@ -1372,7 +1372,12 @@ DNSPacket *PacketHandler::questionOrRecurse(DNSPacket *p, bool *shouldRecurse)
DLOG(L<<"Have unauth data, so need to hunt for best NS records"<<endl);
if(tryReferral(p, r, sd, target))
goto sendit;
- L<<Logger::Error<<"Should not get here ("<<p->qdomain<<"|"<<p->qtype.getCode()<<"): please run pdnssec rectify-zone "<<sd.qname<<endl;
+ // check whether this could be fixed easily
+ if (*(rr.qname.rbegin()) == '.') {
+ L<<Logger::Error<<"Should not get here ("<<p->qdomain<<"|"<<p->qtype.getCode()<<"): you have a trailing dot, this could be the problem (or run pdnssec rectify-zone " <<sd.qname<<")"<<endl;
+ } else {
+ L<<Logger::Error<<"Should not get here ("<<p->qdomain<<"|"<<p->qtype.getCode()<<"): please run pdnssec rectify-zone "<<sd.qname<<endl;
+ }
}
else {
DLOG(L<<"Have some data, but not the right data"<<endl);

0 comments on commit 2b18bcf

Please sign in to comment.