]> granicus.if.org Git - pdns/commitdiff
catch DNSName parser exception in recursor
authorKees Monshouwer <mind04@monshouwer.org>
Tue, 28 Jul 2015 15:10:35 +0000 (17:10 +0200)
committermind04 <mind04@monshouwer.org>
Tue, 28 Jul 2015 15:10:35 +0000 (17:10 +0200)
pdns/pdns_recursor.cc

index fabc2f88c18bec497657c901843be12c6c5efe96..a55d37ef99851b43023e5962f7d2079a47b22b54 100644 (file)
@@ -1075,6 +1075,11 @@ void handleNewUDPQuestion(int fd, FDMultiplexer::funcparam_t& var)
       if(g_logCommonErrors)
         L<<Logger::Error<<"Unable to parse packet from remote UDP client "<<fromaddr.toString() <<": "<<mde.what()<<endl;
     }
+    catch(std::runtime_error& e) {
+      g_stats.clientParseError++;
+      if(g_logCommonErrors)
+        L<<Logger::Error<<"Unable to parse packet from remote UDP client "<<fromaddr.toString() <<": "<<e.what()<<endl;
+    }
   }
   else {
     // cerr<<t_id<<" had error: "<<stringerror()<<endl;