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:
Robey Pointer 2008-02-19 21:59:38 -08:00
parent 73c8dadb62
commit ceb65ed55f
2 changed files with 2 additions and 0 deletions

View File

@ -92,6 +92,7 @@ class Channel (object):
self.event = threading.Event()
self.combine_stderr = False
self.exit_status = -1
self.origin_addr = None
def __del__(self):
try:

View File

@ -1987,6 +1987,7 @@ class Transport (threading.Thread):
if kind == 'x11':
self._x11_handler(chan, (origin_addr, origin_port))
elif kind == 'forwarded-tcpip':
chan.origin_addr = (origin_addr, origin_port)
self._tcp_handler(chan, (origin_addr, origin_port), (server_addr, server_port))
else:
self._queue_incoming_channel(chan)