bind9/bin
Ondřej Surý f7cd00f1ef Fix swapped arguments in redirect2() single-label branch
For a query whose qname is the root, the labels==1 branch in
redirect2() called dns_name_copy(redirectname, view->redirectzone)
with arguments reversed, overwriting the view-global
nxdomain-redirect target with the empty redirectname rather than
copying the configured target into the per-query lookup name.  After
the corruption, view->redirectzone names the root, so
dns_name_issubdomain() makes redirect2() short-circuit for every
subsequent query and the nxdomain-redirect feature stops working
until named is restarted.

Triggering this needs the resolver to receive an NXDOMAIN for the
root from upstream, which does not happen in normal DNS operation.

Swap the arguments to match the dns_name_copy(source, dest)
signature.  Add a system test that issues a root query through the
nxdomain-redirect resolver and verifies the redirect feature still
works for a normal NXDOMAIN-producing query afterwards.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit c62f24f7ee)
2026-04-30 07:08:47 +02:00
..
check Resolve ERR_MISSING_GLUE / ERR_EXTRA_AAAA value collision 2026-04-29 15:32:03 +00:00
confgen Size HMAC key generation buffers to the maximum block size 2026-04-30 06:01:01 +02:00
delv Use const pointer with strchr of const pointer 2026-01-20 06:00:56 +00:00
dig Document that query options are order sensitive 2026-02-09 22:47:20 +00:00
dnssec Fix dnssec-signzone usage output 2026-03-23 09:36:54 +00:00
named Fix inverted gethostname() check in rndc status 2026-04-17 17:58:17 +02:00
nsupdate nsupdate does not handle zero length RDATA well 2026-04-09 00:34:20 +00:00
plugins standardize CHECK and RETERR macros 2025-12-03 19:18:12 -08:00
rndc document config option dependency for showzone 2025-10-23 20:11:45 +00:00
tests Fix swapped arguments in redirect2() single-label branch 2026-04-30 07:08:47 +02:00
tools Use const pointer with strchr of const pointer 2026-01-20 06:00:56 +00:00
Makefile.am Remove native PKCS#11 support 2021-09-09 15:35:39 +02:00