Skip to content

Commit 70d5a66

Browse files
committed
improve error message in illformated unknown record type, thanks Jelte for reporting
1 parent 90921cd commit 70d5a66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pdns/dnsparser.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class UnknownRecordContent : public DNSRecordContent
6060
const string& relevant=(parts.size() > 2) ? parts[2] : "";
6161
unsigned int total=atoi(parts[1].c_str());
6262
if(relevant.size()!=2*total)
63-
throw runtime_error("invalid unknown record");
63+
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());
6464
string out;
6565
out.reserve(total+1);
6666
for(unsigned int n=0; n < total; ++n) {

0 commit comments

Comments
 (0)