]> granicus.if.org Git - pdns/commitdiff
Fix attempt to restrict/speed-up additional processing to auth zone
authorbert hubert <bert.hubert@netherlabs.nl>
Tue, 8 Jan 2019 20:31:55 +0000 (21:31 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Tue, 8 Jan 2019 20:31:55 +0000 (21:31 +0100)
When doing additional processing, an attempt is made to restrict the lookup
to the zone we are answering from.  Sadly, we use the domain_id of an
optional getSOA lookup, a lookup that frequently does not happen.

Fixing this shaves 20-40 microseconds from a referral when serving the root.

pdns/packethandler.cc

index f1281a714730c9e3bf8800665bf6f1be51f4c4c1..211908a74ad4da2af75f8dee1209e0616a7855c6 100644 (file)
@@ -456,7 +456,7 @@ int PacketHandler::doAdditionalProcessingAndDropAA(DNSPacket *p, DNSPacket *r, c
       else
         continue;
 
-      B.lookup(QType(d_doIPv6AdditionalProcessing ? QType::ANY : QType::A), lookup, p, sd.domain_id);
+      B.lookup(QType(d_doIPv6AdditionalProcessing ? QType::ANY : QType::A), lookup, p, soadata.domain_id);
 
       while(B.get(rr)) {
         if(rr.dr.d_type != QType::A && rr.dr.d_type!=QType::AAAA)