summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile.in2
-rw-r--r--cli-session.c4
-rw-r--r--options.h4
-rw-r--r--tcp-accept.c5
4 files changed, 10 insertions, 5 deletions
diff --git a/Makefile.in b/Makefile.in
index 68ef5d8..4ea2f28 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -33,7 +33,7 @@ CLIOBJS=cli-algo.o cli-main.o cli-auth.o cli-authpasswd.o cli-kex.o \
CLISVROBJS=common-session.o packet.o common-algo.o common-kex.o \
common-channel.o common-chansession.o termcodes.o loginrec.o \
- tcp-accept.o tcp-connect.o listener.o process-packet.o \
+ tcp-accept.o listener.o process-packet.o \
common-runopts.o
KEYOBJS=dropbearkey.o gendss.o genrsa.o
diff --git a/cli-session.c b/cli-session.c
index 318bc64..20ce89a 100644
--- a/cli-session.c
+++ b/cli-session.c
@@ -179,9 +179,11 @@ static void cli_sessionloop() {
case USERAUTH_SUCCESS_RCVD:
#ifdef ENABLE_CLI_LOCALTCPFWD
- TRACE(("recvd USERAUTH_SUCCESS_RCVD"));
setup_localtcp();
#endif
+#ifdef ENABLE_CLI_REMOTETCPFWD
+ setup_remotetcp();
+#endif
cli_send_chansess_request();
TRACE(("leave cli_sessionloop: cli_send_chansess_request"));
cli_ses.state = SESSION_RUNNING;
diff --git a/options.h b/options.h
index c841332..cb9dc9a 100644
--- a/options.h
+++ b/options.h
@@ -306,6 +306,10 @@
#define ENABLE_CLI_ANYTCPFWD
#endif
+#if defined(ENABLE_CLI_LOCALTCPFWD) || defined(ENABLE_SVR_REMOTETCPFWD)
+#define DROPBEAR_TCP_ACCEPT
+#endif
+
#if defined(ENABLE_REMOTETCPFWD) || defined(ENABLE_LOCALTCPFWD) || \
defined(ENABLE_AGENTFWD) || defined(ENABLE_X11FWD)
#define USING_LISTENERS
diff --git a/tcp-accept.c b/tcp-accept.c
index 6b82914..63d9775 100644
--- a/tcp-accept.c
+++ b/tcp-accept.c
@@ -8,8 +8,7 @@
#include "listener.h"
#include "runopts.h"
-#ifndef DISABLE_TCP_ACCEPT
-
+#ifdef DROPBEAR_TCP_ACCEPT
static void cleanup_tcp(struct Listener *listener) {
@@ -94,4 +93,4 @@ int listen_tcpfwd(struct TCPListener* tcpinfo) {
return DROPBEAR_SUCCESS;
}
-#endif /* DISABLE_REMOTETCPFWD */
+#endif /* DROPBEAR_TCP_ACCEPT */