diff options
author | Matt Johnston <matt@ucc.asn.au> | 2012-05-09 21:09:34 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2012-05-09 21:09:34 +0800 |
commit | 1984aabc950904a9717735ae82b0bbf7d89d3478 (patch) | |
tree | 67514df54535a180f6b5eb3753983556696ebff4 /tcp-accept.c | |
parent | f4c4ca64a827661a392749a0684e59ba1556447e (diff) |
Server shouldn't return "localhost" in response to -R forward connections
if that wasn't what the client requested.
Diffstat (limited to 'tcp-accept.c')
-rw-r--r-- | tcp-accept.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tcp-accept.c b/tcp-accept.c index c133535..bb7c5e3 100644 --- a/tcp-accept.c +++ b/tcp-accept.c @@ -40,6 +40,7 @@ static void cleanup_tcp(struct Listener *listener) { m_free(tcpinfo->sendaddr); m_free(tcpinfo->listenaddr); + m_free(tcpinfo->request_listenaddr); m_free(tcpinfo); } @@ -78,7 +79,7 @@ static void tcp_acceptor(struct Listener *listener, int sock) { dropbear_assert(tcpinfo->tcp_type == forwarded); /* "forwarded-tcpip" */ /* address that was connected, port that was connected */ - addr = tcpinfo->listenaddr; + addr = tcpinfo->request_listenaddr; port = tcpinfo->listenport; } |