From 137d738ae8a7e86395ee82815e8b300bc91e6f33 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Tue, 8 Jan 2019 21:31:55 +0100 Subject: [PATCH] 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. --- pdns/packethandler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.40.0