From: Colin Vidal Date: Wed, 1 Jul 2026 09:56:41 +0000 (+0200) Subject: chg: dev: Follow-up of disambiguate `query_cname()` and `query_dname()` usage X-Git-Tag: v9.21.24~8 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=cdf1b61c27d64d3cbbf68fb271c2e861fa4d705b;p=thirdparty%2Fbind9.git chg: dev: Follow-up of disambiguate `query_cname()` and `query_dname()` usage Previous commit "Disambiguate `query_cname()` and `query_dname()` usage" was harmless but also useless, as it was checking `qctx->result` which is always set to `ISC_R_SUCCESS` when `qctx` is initialized. The intent was to check `qctx->fresp->result` (which is the result provided by the resolver). But this was also wrong (this is actually the case we do expect `query_cname()`/`query_dname()` to be called, to follow the chain). The actual invarant that needs to be checked is if the qtype is CNAME then we do not follow the chain, so we can't call `query_cname()`. This invariant has been added. If the qtype is DNAME, it's more complex, because a DNAME can be found from a local zone or cache and the chain can be locally followed. In which case, calling `query_dname()` is legit, as soon as the qname is a subname of the DNAME target. This invariant is already checked. Merge branch 'colin/follow-up-disambiguate-query_cname_dname' into 'security-main' See merge request isc-private/bind9!1089 --- cdf1b61c27d64d3cbbf68fb271c2e861fa4d705b