From: Pieter Lexis Date: Mon, 15 Feb 2021 08:23:01 +0000 (+0100) Subject: pdnsutil load-zone: reject zones with broken rrs X-Git-Tag: dnsdist-1.6.0-alpha2~31^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9b893816f726a0f78bf4f46699b94bc08c90b33d;p=thirdparty%2Fpdns.git pdnsutil load-zone: reject zones with broken rrs --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index f5194473ef..8ab8397940 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -1278,6 +1278,17 @@ static int loadZone(const DNSName& zone, const string& fname) { else haveSOA = true; } + try { + DNSRecordContent::mastermake(rr.qtype, QClass::IN, rr.content); + } + catch (const PDNSException &pe) { + cerr<<"Bad record content in record for "<feedRecord(rr, DNSName()); } db->commitTransaction();