mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-12 17:30:00 -04:00
Add debug logs for outgoing DNS messages
Since AsyncDnsServer logs incoming DNS messages as seen on the wire, do
the same for the responses sent by the server.
(cherry picked from commit 2a9c74546d)
This commit is contained in:
parent
108adab25a
commit
717f334daf
1 changed files with 2 additions and 0 deletions
|
|
@ -580,6 +580,7 @@ class AsyncDnsServer(AsyncServer):
|
|||
peer = Peer(addr[0], addr[1])
|
||||
responses = self._handle_query(wire, peer, DnsProtocol.UDP)
|
||||
async for response in responses:
|
||||
logging.debug("Sending UDP message: %s", response.hex())
|
||||
transport.sendto(response, addr)
|
||||
|
||||
async def _handle_tcp(
|
||||
|
|
@ -672,6 +673,7 @@ class AsyncDnsServer(AsyncServer):
|
|||
) -> None:
|
||||
responses = self._handle_query(wire, peer, DnsProtocol.TCP)
|
||||
async for response in responses:
|
||||
logging.debug("Sending TCP response: %s", response.hex())
|
||||
writer.write(response)
|
||||
await writer.drain()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue