]> granicus.if.org Git - pdns/commitdiff
Added warning if trailing dot is used.
authorAki Tuomi <cmouse@desteem.org>
Tue, 28 May 2013 11:46:42 +0000 (14:46 +0300)
committerAki Tuomi <cmouse@desteem.org>
Tue, 28 May 2013 11:46:42 +0000 (14:46 +0300)
pdns/packethandler.cc

index 549cac397ebb21f827e8e227ebb4e68a290294c3..5ac16456829bd127d90fce013a61f91c8b3884a8 100644 (file)
@@ -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);