bind9/lib/ns
Evan Hunt 3704cf42eb Don't use dns_db_findzonecut() in query_addbestns()
Previously, when answering from the cache, and when minimal-responses
was not set, we added the best known zone cut to the authority section
of the response message, using dns_db_findzonecut() to look it up in
the DNS cache.  Since the DNS cache will no longer be used to store
parent-side NS RRsets, it will now be possible for an ancestor node
to be used as the zone cut, leading to the wrong NS record being
included.

There are various ways we could correct this:

1. Use dns_deleg_lookup() instead of dns_db_findzonecut() to find the
   zone cut. But currently, the deleg database stores only the server
   addresses for the delegation, not the full NS RRset; this would need
   to be changed.
2. Look up <name>/NS whenever we cache a referral; that way we'll get
   the child-side NS RRset and cache that, and we can retrieve it when
   building the response.

But the solution chosen here is simply not to look up the NS record
when answering from the cache, effectively making "minimal-responses
yes;" mandatory for queries answered from the cache.

System tests have been updated as needed, so they no longer expect
NS RRsets in the authority section of recursive responses.
2026-03-30 20:41:13 +02:00
..
include Use delegation DB for bestzonecut lookups 2026-03-30 20:41:13 +02:00
.gitignore Add support for User Statically Defined Tracing (USDT) probes 2023-08-21 18:39:53 +02:00
client.c Add low contention stats counter 2026-03-26 10:19:25 +01:00
hooks.c use a standard CLEANUP macro 2025-12-03 13:45:43 -08:00
interfacemgr.c switch to RETERR where it wasn't being used 2025-12-03 13:45:43 -08:00
listenlist.c Use ControlStatementsExceptControlMacros for SpaceBeforeParens 2025-08-19 07:58:33 +02:00
meson.build Use unique names for probes.d files 2025-09-24 13:18:13 +02:00
notify.c Improve efficiency of ns_client_t reset 2025-07-10 07:19:47 +02:00
probes-ns.d Use unique names for probes.d files 2025-09-24 13:18:13 +02:00
query.c Don't use dns_db_findzonecut() in query_addbestns() 2026-03-30 20:41:13 +02:00
server.c Add low contention stats counter 2026-03-26 10:19:25 +01:00
stats.c Add low contention stats counter 2026-03-26 10:19:25 +01:00
tests Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
update.c Fix update-policy per-type max quota bypass via counter desynchronization 2026-03-28 10:07:49 +01:00
xfrout.c Log serial when IXFR version not in journal 2025-12-10 15:24:29 +00:00