]> granicus.if.org Git - pdns/commitdiff
improve error message in illformated unknown record type, thanks Jelte for reporting
authorbert hubert <bert.hubert@netherlabs.nl>
Wed, 12 Jun 2013 12:22:21 +0000 (14:22 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Wed, 12 Jun 2013 12:22:21 +0000 (14:22 +0200)
pdns/dnsparser.cc

index 7eb5179e4398b9ad913b3c37c7616df1f4c68c71..5a65f0b6162249ece44b1baeaa9c766358fa7f72 100644 (file)
@@ -60,7 +60,7 @@ public:
     const string& relevant=(parts.size() > 2) ? parts[2] : "";
     unsigned int total=atoi(parts[1].c_str());
     if(relevant.size()!=2*total)
-      throw runtime_error("invalid unknown record");
+      throw MOADNSException((boost::format("invalid unknown record length for label %s: size not equal to length field (%d != %d)") % d_dr.d_label.c_str() % relevant.size() % (2*total)).str());
     string out;
     out.reserve(total+1);
     for(unsigned int n=0; n < total; ++n) {