]> granicus.if.org Git - pdns/commitdiff
not a real fix for ticket #60, but it will have to do.
authorBert Hubert <bert.hubert@netherlabs.nl>
Thu, 2 Mar 2006 19:56:43 +0000 (19:56 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Thu, 2 Mar 2006 19:56:43 +0000 (19:56 +0000)
The suggestion to silently omit unsupported record types won't do as it creates unnoticed inconsistencies.

git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@566 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/communicator.cc

index 42021ddb9bc0b327897c532f276f0d1354e376b3..2426ae70e1f96d67c59dd53172f516e2c8c82634 100644 (file)
@@ -30,6 +30,9 @@
 #include "arguments.hh"
 #include "session.hh"
 #include "packetcache.hh"
+#include <boost/lexical_cast.hpp>
+
+using namespace boost;
 
 void CommunicatorClass::addSuckRequest(const string &domain, const string &master, bool priority)
 {
@@ -86,6 +89,9 @@ void CommunicatorClass::suck(const string &domain,const string &remote)
          return;
        }
        i->domain_id=domain_id;
+       if(i->qtype.getCode()>=1024)
+         throw DBException("Database can't store unknown record type "+lexical_cast<string>(i->qtype.getCode()-1024));
+
        di.backend->feedRecord(*i);
       }
     }