From: Evan Hunt Date: Tue, 24 Feb 2026 00:27:52 +0000 (-0800) Subject: Make the RD flag optional in isctest.query() X-Git-Tag: v9.18.49~4^2 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=d79f2d3f35887ea4525e283d389d9078fa1ef439;p=thirdparty%2Fbind9.git Make the RD flag optional in isctest.query() Add an 'rd' parameter (default True) to isctest.query.create() so that non-recursive queries can be sent with rd=False. (cherry picked from commit 12e511310024aac38ce223ee47b5108f06caf8f9) --- diff --git a/bin/tests/system/isctest/query.py b/bin/tests/system/isctest/query.py index a002f626df4..4f4e0a7c457 100644 --- a/bin/tests/system/isctest/query.py +++ b/bin/tests/system/isctest/query.py @@ -106,6 +106,7 @@ def create( qtype, qclass=dns.rdataclass.IN, dnssec: bool = True, + rd: bool = True, cd: bool = False, ad: bool = True, ) -> dns.message.Message: @@ -113,7 +114,9 @@ def create( msg = dns.message.make_query( qname, qtype, qclass, use_edns=True, want_dnssec=dnssec ) - msg.flags = dns.flags.RD + msg.flags = 0 + if rd: + msg.flags = dns.flags.RD if ad: msg.flags |= dns.flags.AD if cd: