Commit e1c6cabe99 for bind
commit e1c6cabe9907630683ed1bac71cc998f18eadd24
Author: Nicki Křížek <nicki@isc.org>
Date: Mon Oct 26 17:06:20 2026 +0000
Make get_rrset() see RRsets appended to an asyncserver response
dnspython's Message.get_rrset() and find_rrset() look only in the
message's RRset index, which only find_rrset(create=True) and the
message parsers fill. The server and its handlers build responses with
plain section.append(), so a handler's get_rrset() on qctx.response
returned None for RRsets the response carried, while the same call
found them in the parsed response in the test module. Without the
index, both scan the sections.
Building responses with find_rrset(create=True) instead would not cover
the handlers' appends, and would merge RRsets a server sends twice on
purpose.
See https://github.com/rthalley/dnspython/issues/1389
Assisted-by: Claude:claude-opus-5-5
diff --git a/bin/tests/system/isctest/asyncserver/__init__.py b/bin/tests/system/isctest/asyncserver/__init__.py
index ab5c8b68c9..da89d2e1ea 100644
--- a/bin/tests/system/isctest/asyncserver/__init__.py
+++ b/bin/tests/system/isctest/asyncserver/__init__.py
@@ -380,6 +380,8 @@ _ASYNCSERVER_RESPONSE_MARKER = "__is_asyncserver_response__"
def _make_asyncserver_response(query: dns.message.Message) -> dns.message.Message:
response = dns.message.make_response(query)
+ # Work around dnspython#1389
+ response.index = None # type: ignore[assignment]
setattr(response, _ASYNCSERVER_RESPONSE_MARKER, True)
return response