mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-25 19:02:12 -04:00
Remove NoErrorHandler
The NoErrorHandler class does not get matched to any query sent by ns4
in the "resend_loop" test. Remove it as it is redundant.
(cherry picked from commit a296bcf587)
This commit is contained in:
parent
c0e52f4ec2
commit
9c24d5a16d
1 changed files with 0 additions and 16 deletions
|
|
@ -24,7 +24,6 @@ from isctest.asyncserver import (
|
|||
DomainHandler,
|
||||
QnameQtypeHandler,
|
||||
QueryContext,
|
||||
ResponseHandler,
|
||||
StaticResponseHandler,
|
||||
)
|
||||
|
||||
|
|
@ -85,26 +84,11 @@ class CookieHandler(DomainHandler):
|
|||
yield DnsResponseSend(qctx.response, authoritative=True)
|
||||
|
||||
|
||||
class NoErrorHandler(ResponseHandler):
|
||||
"""
|
||||
If the query is NOT a subdomain of example, respond with standard NOERROR empty answer
|
||||
"""
|
||||
|
||||
async def get_responses(
|
||||
self, qctx: QueryContext
|
||||
) -> AsyncGenerator[DnsResponseSend, None]:
|
||||
|
||||
qctx.prepare_new_response()
|
||||
qctx.response.set_rcode(dns.rcode.NOERROR)
|
||||
yield DnsResponseSend(qctx.response, authoritative=True)
|
||||
|
||||
|
||||
def resend_server() -> AsyncDnsServer:
|
||||
server = AsyncDnsServer(default_aa=True, default_rcode=dns.rcode.NOERROR)
|
||||
server.install_response_handlers(
|
||||
RootNSHandler(),
|
||||
CookieHandler(),
|
||||
NoErrorHandler(),
|
||||
)
|
||||
return server
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue