Skip to content

Commit

Permalink
rec: a single NSEC3 record covering everything is a special case
Browse files Browse the repository at this point in the history
Fixes PowerDNS#13542

(cherry picked from commit 257b23b)
  • Loading branch information
omoerbeek committed Feb 14, 2024
1 parent 3284b14 commit ee8f3e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pdns/recursordist/aggressive_nsec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ static bool commonPrefixIsLong(const string& one, const string& two, size_t boun
bool AggressiveNSECCache::isSmallCoveringNSEC3(const DNSName& owner, const std::string& nextHash)
{
std::string ownerHash(fromBase32Hex(owner.getRawLabel(0)));
// Special case: empty zone, so the single NSEC3 covers everything. Prefix is long but we still want it cached.
if (ownerHash == nextHash) {
return false;
}
return commonPrefixIsLong(ownerHash, nextHash, AggressiveNSECCache::s_maxNSEC3CommonPrefix);
}

Expand Down

0 comments on commit ee8f3e8

Please sign in to comment.