bind9/lib
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
..
dns Size HMAC key generation buffers to the maximum block size 2026-04-29 19:21:20 +02:00
isc Stop isc_file_safecreate from following symlinks 2026-04-29 16:56:25 +02:00
isccc switch isc_md_type_t to a proper enum 2026-02-02 11:12:55 +03:00
isccfg Fix a bug with template filename reuse 2026-04-14 21:50:31 -07:00
ns Fix swapped arguments in redirect2() single-label branch 2026-04-29 21:46:27 +02:00
.gitignore The isc/platform.h header has been completely removed 2021-07-06 05:33:48 +00:00
meson.build replace the build system with meson 2025-06-11 10:30:12 +03:00