Parcourir la source

[1805] minor optimization: check nsec_signed first in getClosestNSEC().

in practice the DNSSEC option is provided in many cases, considering
the common default behavior of widely deployed resolvers, while not many
zones are actually not signed at all in the first place (much less whether
it's NSEC or NSEC3).  so in many cases we should simply be able to stop the
condition check with the nsec_signed.
JINMEI Tatuya il y a 13 ans
Parent
commit
32bb3f9e17
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/lib/datasrc/memory_datasrc.cc

+ 1 - 1
src/lib/datasrc/memory_datasrc.cc

@@ -251,7 +251,7 @@ ConstRBNodeRRsetPtr
 ZoneData::getClosestNSEC(RBTreeNodeChain<Domain>& node_path,
                          ZoneFinder::FindOptions options) const
 {
-    if ((options & ZoneFinder::FIND_DNSSEC) == 0 || !nsec_signed_) {
+    if (!nsec_signed_ || (options & ZoneFinder::FIND_DNSSEC) == 0) {
         return (ConstRBNodeRRsetPtr());
     }