for forwarded-tcpip connections, stuff the origin_addr in a public field in the Channel, in case recipients find it useful info.
This commit is contained in:
parent
73c8dadb62
commit
ceb65ed55f
|
@ -92,6 +92,7 @@ class Channel (object):
|
||||||
self.event = threading.Event()
|
self.event = threading.Event()
|
||||||
self.combine_stderr = False
|
self.combine_stderr = False
|
||||||
self.exit_status = -1
|
self.exit_status = -1
|
||||||
|
self.origin_addr = None
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -1987,6 +1987,7 @@ class Transport (threading.Thread):
|
||||||
if kind == 'x11':
|
if kind == 'x11':
|
||||||
self._x11_handler(chan, (origin_addr, origin_port))
|
self._x11_handler(chan, (origin_addr, origin_port))
|
||||||
elif kind == 'forwarded-tcpip':
|
elif kind == 'forwarded-tcpip':
|
||||||
|
chan.origin_addr = (origin_addr, origin_port)
|
||||||
self._tcp_handler(chan, (origin_addr, origin_port), (server_addr, server_port))
|
self._tcp_handler(chan, (origin_addr, origin_port), (server_addr, server_port))
|
||||||
else:
|
else:
|
||||||
self._queue_incoming_channel(chan)
|
self._queue_incoming_channel(chan)
|
||||||
|
|
Loading…
Reference in New Issue