mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-27 12:13:20 -04:00
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 12e5113100)
This commit is contained in:
parent
7e3d49815c
commit
d79f2d3f35
1 changed files with 4 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue