From 9ea7c3bfcf5fdf3728471b7325278fa59d80fc54 Mon Sep 17 00:00:00 2001
From: Matt Johnston <matt@ucc.asn.au>
Date: Thu, 12 Aug 2004 13:54:31 +0000
Subject: [PATCH] Oops, forgot to call the actual code.

--HG--
extra : convert_revision : 1394bf640a0721eb3851fdb9e534c5a65c8bc0f6
---
 Makefile.in   | 2 +-
 cli-session.c | 4 +++-
 options.h     | 4 ++++
 tcp-accept.c  | 5 ++---
 4 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 68ef5d82..4ea2f285 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 318bc64e..20ce89ac 100644
--- a/cli-session.c
+++ b/cli-session.c
@@ -179,8 +179,10 @@ 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"));
diff --git a/options.h b/options.h
index c841332f..cb9dc9a8 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 6b82914b..63d97757 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 */
-- 
GitLab