From: Peter van Dijk Date: Wed, 25 Nov 2020 12:07:12 +0000 (+0100) Subject: pdnsutil add-record: notice when backend does not support replaceRRSet. Fixes #9730 X-Git-Tag: auth-4.5.0-alpha0~3^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F9775%2Fhead;p=thirdparty%2Fpdns.git pdnsutil add-record: notice when backend does not support replaceRRSet. Fixes #9730 --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index f9d0481db8..a8b1ffc577 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -1408,7 +1408,10 @@ static int addOrReplaceRecord(bool addOrReplace, const vector& cmds) { } - di.backend->replaceRRSet(di.id, name, rr.qtype, newrrs); + if(!di.backend->replaceRRSet(di.id, name, rr.qtype, newrrs)) { + cerr<<"backend did not accept the new RRset, aborting"<lookup(rr.qtype, name, di.id); cout<<"New rrset:"<