diff --git a/paramiko/channel.py b/paramiko/channel.py index 133a2fb..c1a2652 100644 --- a/paramiko/channel.py +++ b/paramiko/channel.py @@ -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: diff --git a/paramiko/transport.py b/paramiko/transport.py index 68c6d93..4ceb4a0 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -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)