]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
reinstate old behaviour that we do process authoritative responses that are header... 3497/head
authorbert hubert <bert.hubert@netherlabs.nl>
Wed, 2 Mar 2016 14:02:12 +0000 (15:02 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Wed, 2 Mar 2016 14:03:12 +0000 (15:03 +0100)
pdns/pdns_recursor.cc

index 3042f8e5deaca2fa93a185588a3de1b5d2f373b8..3d56ab172d5bc9aa916dc13a333f6547528233c4 100644 (file)
@@ -1949,11 +1949,12 @@ void handleUDPServerResponse(int fd, FDMultiplexer::funcparam_t& var)
   }
   else {
     try {
-      pident.domain=DNSName(data, len, 12, false, &pident.type); // don't copy this from above - we need to do the actual read
+      if(len > 12)
+        pident.domain=DNSName(data, len, 12, false, &pident.type); // don't copy this from above - we need to do the actual read
     }
     catch(std::exception& e) {
       g_stats.serverParseError++; // won't be fed to lwres.cc, so we have to increment
-      L<<Logger::Warning<<"Error in packet from "<< fromaddr.toStringWithPort() << ": "<<e.what() << endl;
+      L<<Logger::Warning<<"Error in packet from remote nameserver "<< fromaddr.toStringWithPort() << ": "<<e.what() << endl;
       return;
     }
   }