mirror of
https://github.com/sshuttle/sshuttle.git
synced 2024-11-25 01:13:37 +01:00
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.
This commit is contained in:
parent
5c8c707208
commit
7d89b2d89f
@ -419,7 +419,12 @@ def ondns(listener, method, mux, handlers):
|
||||
if t is None:
|
||||
return
|
||||
srcip, dstip, data = t
|
||||
debug1('DNS request from %r to %r: %d bytes\n' % (srcip, dstip, len(data)))
|
||||
# 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)))
|
||||
chan = mux.next_channel()
|
||||
dnsreqs[chan] = now + 30
|
||||
mux.send(chan, ssnet.CMD_DNS_REQ, data)
|
||||
|
Loading…
Reference in New Issue
Block a user