Commit 64611b96 authored by JINMEI Tatuya's avatar JINMEI Tatuya

[1607] use the result of findZone() to check if qname is zone origin.

This should be more efficient than expensive name comparison.
This is a small (unrelated) optimization, but hopefully it's okay.
parent 6f31530f
......@@ -503,7 +503,9 @@ Query::process() {
// section, insert apex NS records into the authority section
// and AAAA/A RRS of each of the NS RDATA into the additional
// section.
if (qname_ != result.zone_finder->getOrigin() ||
// Checking the findZone() is a lightweight check to see if
// qname is the zone origin.
if (result.code != result::SUCCESS ||
db_context->code != ZoneFinder::SUCCESS ||
(qtype_ != RRType::NS() && !qtype_is_any))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment