summaryrefslogtreecommitdiffhomepage
path: root/tcp-accept.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 /tcp-accept.c
parent78e17f6ee9a944430da3e517ee1fe384fd6b275b (diff)
parent17873e8c922eded2cec86184673a6d110df6403f (diff)
merge from main
--HG-- branch : fuzz
Diffstat (limited to 'tcp-accept.c')
-rw-r--r--tcp-accept.c8
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;
}