]> git.ipfire.org Git - thirdparty/bind9.git/commit
[9.20] new: test: Add support for control commands to isctest.asyncserver
authorMichał Kępień <michal@isc.org>
Fri, 11 Apr 2025 14:49:22 +0000 (14:49 +0000)
committerMichał Kępień <michal@isc.org>
Fri, 11 Apr 2025 14:49:22 +0000 (14:49 +0000)
commit58e446eaee70afba649a8ee4bf67d1d806486359
treeb3994d496c85bd53997f6383169b01971b0af26e
parent2ad08001ad477d19bbd9690b501982ab1d3a204a
parentcdc89ec5faddacef030157824facea12be9660d9
[9.20] new: test: Add support for control commands to isctest.asyncserver

Some BIND 9 system tests need to dynamically change custom server
behavior at runtime.  Existing custom servers typically use a separate
TCP socket for listening to control commands, which mimics what `named`
does, but adds extra complexity to the custom server's networking code
for no gain (given the purpose at hand).  There is also no common way of
performing typical runtime actions (like toggling response dropping)
across all custom servers.

Instead of listening on a separate TCP socket in `asyncserver.py`, make
it detect DNS queries to a "magic" domain (`_control.`) on the same port
as the one it uses for receiving "production" DNS traffic.  This enables
query/response logging code to be reused for control traffic, clearly
denotes behavior changes in packet captures, facilitates implementing
commonly used features as reusable chunks of code (by making them "own"
distinct subdomains of the control domain), voids the need for separate
tools sending control commands, and enables using DNS facilities for
returning information to the user (e.g. RCODE for status codes, TXT
records for additional information, etc.).

Backport of MR !10339

Merge branch 'backport-michal/asyncserver-control-commands-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10383