diff tcp-accept.c @ 675:dfdb9d9189ff

Server shouldn't return "localhost" in response to -R forward connections if that wasn't what the client requested.
author Matt Johnston <matt@ucc.asn.au>
date Wed, 09 May 2012 21:09:34 +0800
parents abf040aedd44
children 5daedffd0769
line wrap: on
line diff
--- a/tcp-accept.c	Wed May 09 20:34:55 2012 +0800
+++ b/tcp-accept.c	Wed May 09 21:09:34 2012 +0800
@@ -40,6 +40,7 @@
 
 	m_free(tcpinfo->sendaddr);
 	m_free(tcpinfo->listenaddr);
+	m_free(tcpinfo->request_listenaddr);
 	m_free(tcpinfo);
 }
 
@@ -78,7 +79,7 @@
 			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;
 		}