Mirror zone data may not be used during resolution despite being available
Consider a server configured with two mirror zones:
-
bar.
, which has its data loaded, -
foo.bar.
, which is not loaded (has expired, has not yet been transferred etc.)
(To make the example more dramatic/realistic, use .
instead of bar.
and org.
instead of foo.bar.
.)
If a query then arrives for a name at or below foo.bar
, named
will not use bar
zone data for resolution purposes, even though it is available.
This happens due to the way dns_zt_find()
was modified to support mirror zones (see 8d996fd7).
I am opening this ticket mostly to publicly indicate that this is a known issue. While handling this scenario more elegantly is possible1, IMHO it is not critical enough to warrant the added complexity. Feel free to prove me wrong.
For now, I plan to resolve this ticket by adding a code comment explaining the issue. If this ever becomes a real-world problem, we will tackle it then.
-
e.g. by employing
dns_rbt_findnode()
instead ofdns_rbt_findname()
when theoptions
argument passed todns_zt_find()
has theDNS_ZTFIND_MIRROR
bit set and then going up the node chain in case the deepest match in the zone table is not loaded↩