]> granicus.if.org Git - pdns/commitdiff
auth: pdnsutil show zone, make sure the DNSKEY is from the right zone
authorKees Monshouwer <mind04@monshouwer.org>
Tue, 9 Jul 2019 20:28:45 +0000 (22:28 +0200)
committermind04 <mind04@monshouwer.org>
Fri, 20 Sep 2019 12:44:10 +0000 (14:44 +0200)
pdns/pdnsutil.cc

index 925c8aebcb7806206b9ea15e6f345af88632099c..49bfa8fc49ff94407e818a9ba7c853d08f0aaa4c 100644 (file)
@@ -1611,9 +1611,8 @@ bool showZone(DNSSECKeeper& dk, const DNSName& zone, bool exportDS = false)
     vector<DNSKEYRecordContent> keys;
     DNSZoneRecord zr;
 
-    B.lookup(QType(QType::DNSKEY), zone, -1 );
-    while(B.get(zr)) {
-      if (zr.dr.d_type != QType::DNSKEY) continue;
+    di.backend->lookup(QType(QType::DNSKEY), zone, di.id );
+    while(di.backend->get(zr)) {
       keys.push_back(*getRR<DNSKEYRecordContent>(zr.dr));
     }