]> granicus.if.org Git - pdns/commitdiff
As noted by Fusl, the new DoS measures kill our daemon in case the root refresh query...
authorbert hubert <bert.hubert@netherlabs.nl>
Sat, 24 Jan 2015 20:07:58 +0000 (21:07 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Sat, 24 Jan 2015 20:07:58 +0000 (21:07 +0100)
pdns/pdns_recursor.cc

index 8f1af16227a456f566050ba0d9860fcf6d695784..0ae585a6c5a7bc8c3c4e462402c126c252a17fab 100644 (file)
@@ -1314,7 +1314,14 @@ try
     vector<DNSResourceRecord> ret;
 
     sr.setNoCache();
-    int res=sr.beginResolve(".", QType(QType::NS), 1, ret);
+    int res=-1;
+    try {
+      res=sr.beginResolve(".", QType(QType::NS), 1, ret);
+    }
+    catch(...)
+    {
+      L<<Logger::Error<<"Failed to update . records, got an exception"<<endl;
+    }
     if(!res) {
       L<<Logger::Notice<<"Refreshed . records"<<endl;
       last_rootupdate=now.tv_sec;