Override root hints properly when doing undelegated tests on the root zone - #466
Open
marc-vanderwal wants to merge 1 commit into
Open
Override root hints properly when doing undelegated tests on the root zone#466marc-vanderwal wants to merge 1 commit into
marc-vanderwal wants to merge 1 commit into
Conversation
marc-vanderwal
requested review from
MichaelTimbert,
matsduf,
mattias-p and
tgreenx
August 10, 2026 09:52
When the zone being tested is the root zone and undelegated data was provided by the user, zonemaster-cli failed to discard all previously loaded root hints before taking the undelegated data into account. Instead, the undelegated data was simply merged with the existing hints. For example, if doing an undelegated test of the root zone with undelegated data calling the root name servers “ns1” and “ns2”, previously, a test like Delegation01 erroneously reported 15 authoritative name servers in the child zone (13 from the built-in root hints + 2 from the undelegated data), instead of just 2.
marc-vanderwal
force-pushed
the
bugfix/#465
branch
from
August 10, 2026 09:56
920add5 to
3da914b
Compare
matsduf
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This PR fixes a programming oversight where undelegated tests on the root zone would behave in an unexpected way. The undelegated data was merely added to the already-loaded root hints, instead of completely overriding them as one would expect.
Context
Fixes #465.
Changes
How to test this PR
Unit tests have been updated and should pass.
You can also test manually by running the following command (but this is exactly what the newly-added unit test does):
Examine the output. It should be identical to this:
As an example, the following output is incorrect: