]> granicus.if.org Git - pdns/commitdiff
catch DNS parsing errors in incoming AXFRs and don't crash on them.
authorBert Hubert <bert.hubert@netherlabs.nl>
Fri, 25 Mar 2011 09:53:09 +0000 (09:53 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Fri, 25 Mar 2011 09:53:09 +0000 (09:53 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2098 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/slavecommunicator.cc

index a03308c434a536fc4f1fe06798ec967e0d48af22..60f8c24ebd6c6b224a06873532fd60db43e1e0e5 100644 (file)
@@ -208,6 +208,13 @@ void CommunicatorClass::suck(const string &domain,const string &remote)
       di.backend->abortTransaction();
     }
   }
+  catch(MOADNSException &re) {
+    L<<Logger::Error<<"Unable to parse record during incoming AXFR of '"+domain+"': "<<re.what()<<endl;
+    if(di.backend && !first) {
+      L<<Logger::Error<<"Aborting possible open transaction for domain '"<<domain<<"' AXFR"<<endl;
+      di.backend->abortTransaction();
+    }
+  }
   catch(ResolverException &re) {
     L<<Logger::Error<<"Unable to AXFR zone '"+domain+"' from remote '"<<remote<<"': "<<re.reason<<endl;
     if(di.backend && !first) {