mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-22 18:17:05 -04:00
dns__deleg_lookup() with DNS_DBFIND_NOEXACT is supposed to return the deepest proper ancestor of the lookup name. It called getparentnode() to step up from an exact match, but getparentnode() only iterated while the chain length was >= 2. When the chain contained a single entry (the exact match itself with no ancestor stored in the trie), the loop did not execute and left the caller looking at the exact match. The subsequent isactive() check then returned success and the function reported the exact match as the "deepest ancestor", violating NOEXACT semantics. This was observable as the resolver picking the child-side delegation for an at-parent type (e.g. a DS query for a TLD), then sending the query to the child's own nameservers and recovering via the "chase DS servers" path. Have getparentnode() set '*node' to NULL when it cannot find an active proper ancestor, and make dns__deleg_lookup() NULL-check before returning, matching the canonical NOEXACT implementation in dns_zt_find(). Update the deleg unit test to expect NOTFOUND for the top-level-no-parent case. |
||
|---|---|---|
| .. | ||
| dns | ||
| isc | ||
| isccc | ||
| isccfg | ||
| ns | ||
| .gitignore | ||
| meson.build | ||