bind9/bin
Ondřej Surý c62f24f7ee 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
2026-04-29 21:46:27 +02:00
..
check Resolve ERR_MISSING_GLUE / ERR_EXTRA_AAAA value collision 2026-04-29 17:31:23 +02:00
confgen Size HMAC key generation buffers to the maximum block size 2026-04-29 19:21:20 +02:00
delv Rename view->hints to view->rootdb and rearm priming 2026-04-16 13:39:18 +02:00
dig Add examples to the dig man page 2026-02-22 11:03:10 -05:00
dnssec Change NSEC3 and NSEC3PARAM struct fields to use isc_region_t 2026-04-02 16:53:18 +02:00
include Remove NZF support, make LMDB required for new zone storage 2026-03-18 11:02:33 +01:00
named Stop nzd_env_close from chowning through symlinks 2026-04-29 19:18:47 +02:00
nsupdate nsupdate does not handle zero length RDATA well 2026-04-09 09:24:47 +10:00
plugins Apply the dns_rdataset_cleanup patch through the codebase 2025-12-17 15:19:55 +01:00
rndc Dump delegation database in 'rndc dumpdb' 2026-03-30 20:41:13 +02:00
tests Fix swapped arguments in redirect2() single-label branch 2026-04-29 21:46:27 +02:00
tools Remove NZF support, make LMDB required for new zone storage 2026-03-18 11:02:33 +01:00
meson.build replace the build system with meson 2025-06-11 10:30:12 +03:00