From: bert hubert Date: Tue, 8 Jan 2019 20:31:55 +0000 (+0100) Subject: Fix attempt to restrict/speed-up additional processing to auth zone X-Git-Tag: rec-4.2.0-alpha1~7^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=137d738ae8a7e86395ee82815e8b300bc91e6f33;p=pdns Fix attempt to restrict/speed-up additional processing to auth zone 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. --- diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index f1281a714..211908a74 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -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)