summaryrefslogtreecommitdiffhomepage
path: root/svr-tcpfwd.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2020-10-15 19:55:15 +0800
committerMatt Johnston <matt@ucc.asn.au>2020-10-15 19:55:15 +0800
commit0e3e8db5bfca0c579be55e7580a46c593c1384be (patch)
tree2b1a718f633fb95c1f2d689a591cf9e8642697f3 /svr-tcpfwd.c
parent78e17f6ee9a944430da3e517ee1fe384fd6b275b (diff)
parent17873e8c922eded2cec86184673a6d110df6403f (diff)
merge from main
--HG-- branch : fuzz
Diffstat (limited to 'svr-tcpfwd.c')
-rw-r--r--svr-tcpfwd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/svr-tcpfwd.c b/svr-tcpfwd.c
index cf6e07b..9a2310d 100644
--- a/svr-tcpfwd.c
+++ b/svr-tcpfwd.c
@@ -57,6 +57,7 @@ static const struct ChanType svr_chan_tcpremote = {
tcp_prio_inithandler,
NULL,
NULL,
+ NULL,
NULL
};
@@ -168,6 +169,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 +210,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;
}
@@ -237,7 +239,8 @@ const struct ChanType svr_chan_tcpdirect = {
newtcpdirect, /* init */
NULL, /* checkclose */
NULL, /* reqhandler */
- NULL /* closehandler */
+ NULL, /* closehandler */
+ NULL /* cleanup */
};
/* Called upon creating a new direct tcp channel (ie we connect out to an