]> git.ipfire.org Git - thirdparty/bind9.git/commit
new: test: Add support for control commands to isctest.asyncserver
authorMichał Kępień <michal@isc.org>
Fri, 11 Apr 2025 14:17:22 +0000 (14:17 +0000)
committerMichał Kępień <michal@isc.org>
Fri, 11 Apr 2025 14:17:22 +0000 (14:17 +0000)
commitb47be755db5fa954bd3c99d3134a2d34ea904cc9
treea8abb48311631a56c37acee9856e635b644a98ef
parentb571c084db16c882f9536d150aa3e0f7c3f4be06
parent92b39f8352661eb0999c09a660333fb134436782
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.).

Merge branch 'michal/asyncserver-control-commands' into 'main'

See merge request isc-projects/bind9!10339