diff options
Diffstat (limited to 'svr-tcpfwd.c')
-rw-r--r-- | svr-tcpfwd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/svr-tcpfwd.c b/svr-tcpfwd.c index cf6e07b..acdb59f 100644 --- a/svr-tcpfwd.c +++ b/svr-tcpfwd.c @@ -168,6 +168,7 @@ static int svr_remotetcpreq(int *allocated_listen_port) { unsigned int addrlen; struct TCPListener *tcpinfo = NULL; unsigned int port; + struct Listener *listener = NULL; TRACE(("enter remotetcpreq")) @@ -208,9 +209,9 @@ static int svr_remotetcpreq(int *allocated_listen_port) { tcpinfo->listenaddr = m_strdup(request_addr); } - ret = listen_tcpfwd(tcpinfo); + ret = listen_tcpfwd(tcpinfo, &listener); if (DROPBEAR_SUCCESS == ret) { - tcpinfo->listenport = get_sock_port(ses.listeners[0]->socks[0]); + tcpinfo->listenport = get_sock_port(listener->socks[0]); *allocated_listen_port = tcpinfo->listenport; } |