Drop redundant uses of authoritative=True

The ans3 custom server instance is created with default_aa=True.  Do not
pass the authoritative=True keyword argument to the DnsResponseSend
constructor in CookieHandler.get_responses() as it is redundant.
This commit is contained in:
Michał Kępień 2026-05-21 11:52:56 +02:00
parent 802c03313f
commit c61539279d
No known key found for this signature in database

View file

@ -80,13 +80,13 @@ class CookieHandler(DomainHandler):
# If missing cookie entirely, just return SERVFAIL
if cookie is None:
qctx.response.set_rcode(dns.rcode.SERVFAIL)
yield DnsResponseSend(qctx.response, authoritative=True)
yield DnsResponseSend(qctx.response)
# If there is a client cookie, mock BADCOOKIE to trigger
# the resend loop logic.
qctx.response.use_edns(options=[cookie])
qctx.response.set_rcode(dns.rcode.BADCOOKIE)
yield DnsResponseSend(qctx.response, authoritative=True)
yield DnsResponseSend(qctx.response)
def resend_server() -> AsyncDnsServer: