Commit 7d89b2d8 authored by Scott Kuhl's avatar Scott Kuhl

Fix "DNS request from ... to None" messages.

Some methods are unable to determine the destination address of DNS
packets that we capture. When this happens, change the message so it
just shows where the DNS requests are from.
parent 5c8c7072
...@@ -419,6 +419,11 @@ def ondns(listener, method, mux, handlers): ...@@ -419,6 +419,11 @@ def ondns(listener, method, mux, handlers):
if t is None: if t is None:
return return
srcip, dstip, data = t srcip, dstip, data = t
# dstip is None if we are using a method where we can't determine
# the destination IP of the DNS request that we captured from the client.
if dstip is None:
debug1('DNS request from %r: %d bytes\n' % (srcip, len(data)))
else:
debug1('DNS request from %r to %r: %d bytes\n' % (srcip, dstip, len(data))) debug1('DNS request from %r to %r: %d bytes\n' % (srcip, dstip, len(data)))
chan = mux.next_channel() chan = mux.next_channel()
dnsreqs[chan] = now + 30 dnsreqs[chan] = now + 30
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment