From 9b893816f726a0f78bf4f46699b94bc08c90b33d Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Mon, 15 Feb 2021 09:23:01 +0100 Subject: [PATCH] pdnsutil load-zone: reject zones with broken rrs --- pdns/pdnsutil.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) 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(); -- 2.47.2