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 #13542
  • Loading branch information
omoerbeek committed Nov 29, 2023
1 parent b252c75 commit 32057b3
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 @@ -229,6 +229,10 @@ static bool commonPrefixIsLong(const string& one, const string& two, size_t boun
size_t length = 0;
const auto minLength = std::min(one.length(), two.length());

// special case: empty zone, so the single NSEC3 covers everything. Prefix is long but we still want it cached.
if (one == two) {
return false;
}
for (size_t i = 0; i < minLength; i++) {
const auto byte1 = one.at(i);
const auto byte2 = two.at(i);
Expand Down

0 comments on commit 32057b3

Please sign in to comment.