diff options
author | Matt Johnston <matt@ucc.asn.au> | 2018-09-07 23:02:20 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2018-09-07 23:02:20 +0800 |
commit | d2e71ade726794d888e998eda0b094a70746160b (patch) | |
tree | ffc9270ec23e57c5bbf1915849a5b02bc8b746fc /tcp-accept.c | |
parent | e7504b33118f30e981195b6022b8ee61a58b2e45 (diff) |
FIx remote forward listeners
Diffstat (limited to 'tcp-accept.c')
-rw-r--r-- | tcp-accept.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tcp-accept.c b/tcp-accept.c index 18cd8c6..6578d71 100644 --- a/tcp-accept.c +++ b/tcp-accept.c @@ -110,12 +110,12 @@ static void tcp_acceptor(const struct Listener *listener, int sock) { } } -int listen_tcpfwd(struct TCPListener* tcpinfo) { +int listen_tcpfwd(struct TCPListener* tcpinfo, struct Listener **ret_listener) { char portstring[NI_MAXSERV]; int socks[DROPBEAR_MAX_SOCKS]; - struct Listener *listener = NULL; int nsocks; + struct Listener *listener; char* errstring = NULL; TRACE(("enter listen_tcpfwd")) @@ -142,6 +142,10 @@ int listen_tcpfwd(struct TCPListener* tcpinfo) { return DROPBEAR_FAILURE; } + if (ret_listener) { + *ret_listener = listener; + } + TRACE(("leave listen_tcpfwd: success")) return DROPBEAR_SUCCESS; } |