zonemaster / zonemaster-engine

The Zonemaster Engine - part of the Zonemaster project
Other
34 stars 33 forks source link

add_fake_delegation() does not respect changed root #1344

Open matsduf opened 4 months ago

matsduf commented 4 months ago

When root has been change all lookups should respect that changed root. add_fake_delegation() does not.

With root given for the following command ns3-undelegated-child.basic01.xa can be resolved, but nsa.dnsnode.net cannot. Using public root, the reverse is true. FAKE_DELEGATION_NO_IP is not expected for ns3-undelegated-child.basic01.xa.

$ zonemaster-cli --raw  --show-testcase --test basic01 --hints COMMON/hintfile  --ns ns3-undelegated-child.basic01.xa --ns nsa.dnsnode.net child.parent.good-undel-1.basic01.xa
   0.40 ERROR    Unspecified    FAKE_DELEGATION_NO_IP  domain=child.parent.good-undel-1.basic01.xa; nsname=ns3-undelegated-child.basic01.xa

This might prevent testing of scenarios with undelegated zones.

tgreenx commented 4 months ago

Indeed, this is a bug due to the fact that out of bailiwick lookups for fake delegations are being done in Zonemaster-LDNS rather than Engine, when $fill_in_empty_oob_glue = 1:

https://github.com/zonemaster/zonemaster-engine/blob/v5.0.0/lib/Zonemaster/Engine.pm#L142

matsduf commented 3 weeks ago

@tgreenx, is this something you could look at? It limits the possibilities in test scenarios.