]> granicus.if.org Git - pdns/commitdiff
Improve error on sending non-TC resp that should be TC
authorPieter Lexis <pieter.lexis@powerdns.com>
Thu, 3 Jan 2019 08:50:26 +0000 (09:50 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Thu, 3 Jan 2019 08:50:26 +0000 (09:50 +0100)
This should aid in debugging when this happens.

pdns/nameserver.cc

index 3ce54d92f6aa90f69e05424966f4d5f9c3d4d371..64757705ec3d3308f50d2ee2fe4d18c3cbaaa038 100644 (file)
@@ -297,7 +297,7 @@ void UDPNameserver::send(DNSPacket *p)
   }
   DLOG(g_log<<Logger::Notice<<"Sending a packet to "<< p->getRemote() <<" ("<< buffer.length()<<" octets)"<<endl);
   if(buffer.length() > p->getMaxReplyLen()) {
-    g_log<<Logger::Error<<"Weird, trying to send a message that needs truncation, "<< buffer.length()<<" > "<<p->getMaxReplyLen()<<endl;
+    g_log<<Logger::Error<<"Weird, trying to send a message that needs truncation, "<< buffer.length()<<" > "<<p->getMaxReplyLen()<<". Question was for "<<p->qdomain<<"|"<<p->qtype.getName()<<endl;
   }
   if(sendmsg(p->getSocket(), &msgh, 0) < 0)
     g_log<<Logger::Error<<"Error sending reply with sendmsg (socket="<<p->getSocket()<<", dest="<<p->d_remote.toStringWithPort()<<"): "<<strerror(errno)<<endl;