-
Notifications
You must be signed in to change notification settings - Fork 37
Description
I think I found a real bug in zonemaster-engine that can produce a false MNAME_HAS_NO_ADDRESS warning in Zone07. I tested with amplitut.de, where ns.amplitut.de clearly has both A and AAAA records, but Zone07 can still report that no IP was found for the SOA mname. Looking at the code, Zonemaster::Engine::Recursor->recurse() stores the lookup result in %recurse_cache even when the result is undef (zonemaster-engine/lib/Zonemaster/Engine/Recursor.pm:98-110). Later calls return that cached undef directly. In zone07(), an undef recurse result means no address gets counted, and this can end in MNAME_HAS_NO_ADDRESS even when the address exists (zonemaster-engine/lib/Zonemaster/Engine/Test/Zone.pm:1183-1217). My suggestion is to not cache undef recurse results, or at least treat cached undef as a cache miss and retry. This seems especially important because transient timeout/cancellation behavior can otherwise poison later checks in the same run.
See example of bug here (with gonemaster-fix):
https://codeberg.org/pawal/gonemaster/issues/25