]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
bump TCP receice buffer to maximum size
authorKees Monshouwer <mind04@monshouwer.org>
Fri, 12 Jul 2013 14:11:40 +0000 (16:11 +0200)
committermind04 <mind04@monshouwer.org>
Thu, 18 Jul 2013 13:07:44 +0000 (15:07 +0200)
pdns/tcpreceiver.cc

index dc30d9d615dcfee2a92702628f24a5c38ce48580..318da8837175fe0414630fc861448c06e6846670 100644 (file)
@@ -241,7 +241,7 @@ void *TCPNameserver::doConnection(void *data)
   pthread_detach(pthread_self());
   Utility::setNonBlocking(fd);
   try {
-    char mesg[512];
+    char mesg[65535];
     
     DLOG(L<<"TCP Connection accepted on fd "<<fd<<endl);
     bool logDNSQueries= ::arg().mustDo("log-dns-queries");
@@ -259,7 +259,7 @@ void *TCPNameserver::doConnection(void *data)
       else
         pktlen=ntohs(pktlen);
 
-      if(pktlen>511) {
+      if(pktlen>sizeof(mesg)) {
         L<<Logger::Error<<"Received an overly large question from "<<remote.toString()<<", dropping"<<endl;
         break;
       }