]> git.ipfire.org Git - thirdparty/bind9.git/commit
Use the delegation database in get_dsset()
authorOndřej Surý <ondrej@isc.org>
Thu, 9 Apr 2026 07:44:29 +0000 (09:44 +0200)
committerColin Vidal <colin@isc.org>
Thu, 16 Apr 2026 09:28:13 +0000 (11:28 +0200)
commit764625ee5b4e209a871418462ccda37283b40968
tree3c00d2167da719b939ad465f9052362125520cd0
parent436b2771d5f3edb8e9f49428ed614ca4a49dc876
Use the delegation database in get_dsset()

When the validator needs a DS RRset and the cache does not have it,
get_dsset() falls back to creating a fresh fetch.  Without a hint, the
resolver picks the closest known zone cut for the DS query, and in the
parent-centric resolver that can land on a delegation at the DS owner
name itself (the child side). This can happens when the parent
delegation is expired, or if the zonecut of the parent doesn't match the
labels in the name.

Querying the child for its own DS records yields NODATA from the apex of
the zone, which sends the resolver into the "chase DS servers" recovery
path and costs two extra round trips for a parent delegation we already
had cached in the delegation database.

Look up the parent zone in the delegation database before kicking
off the fetch, and pass any usable delegation to the resolver as a
hint.  When the hint is present, the resolver sends the DS query
straight to the parent's nameservers and the chase path is avoided
entirely.

To support this, create_fetch() now takes optional 'domain' and
'delegset' parameters that are forwarded to dns_resolver_createfetch().
All other call sites pass NULL.
lib/dns/validator.c