From: bert hubert Date: Mon, 25 Jan 2016 07:13:55 +0000 (+0100) Subject: explicitly print the new rrset which should be.. educational X-Git-Tag: dnsdist-1.0.0-alpha2~34^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=17df2abf3bc6742a58c00f353d8ee8aa09708984;p=pdns explicitly print the new rrset which should be.. educational --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index b8300bd92..902ccb489 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -1002,11 +1002,6 @@ int addOrReplaceRecord(bool addOrReplace, const vector& cmds) { else rr.ttl = ::arg().asNum("default-ttl"); } - for(auto i = contentStart ; i < cmds.size() ; ++i) { - rr.content = DNSRecordContent::mastermake(rr.qtype.getCode(), 1, cmds[i])->getZoneRepresentation(true); - newrrs.push_back(rr); - } - B.lookup(QType(QType::ANY), rr.qname, 0, di.id); bool found=false; if(rr.qtype.getCode() == QType::CNAME) { // this will save us SO many questions @@ -1031,8 +1026,23 @@ int addOrReplaceRecord(bool addOrReplace, const vector& cmds) { } } - di.backend->replaceRRSet(di.id, name, rr.qtype, newrrs); + if(!addOrReplace) { + cout<<"Current records for "<getZoneRepresentation(true); + + newrrs.push_back(rr); + } + + di.backend->replaceRRSet(di.id, name, rr.qtype, newrrs); + // need to be explicit to bypass the ueberbackend cache! + di.backend->lookup(rr.qtype, name, 0, di.id); + cout<<"New rrset:"<get(rr)) { + cout<