summaryrefslogtreecommitdiff
path: root/cli-tcpfwd.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2021-10-11 15:42:14 +0800
committerMatt Johnston <matt@ucc.asn.au>2021-10-11 15:42:14 +0800
commit87ff9a1a5639d5ceab2c9eb474a31126c50a3033 (patch)
treeba4ff7a42c56f214d648365cfb3f6e789156c6be /cli-tcpfwd.c
parent03b9152cc83671c11c0e313d07ba1ee7e4ccaa6e (diff)
downloaddropbear-87ff9a1a5639d5ceab2c9eb474a31126c50a3033.tar.gz
Replace ChanType.sepfds with Channel.bidir_fd
This handles the case where a svrchansess has separate FDs for nopty, but a single FD for pty mode. The use of sepfds was also previously incorrect for X11 and agent forwarding
Diffstat (limited to 'cli-tcpfwd.c')
-rw-r--r--cli-tcpfwd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/cli-tcpfwd.c b/cli-tcpfwd.c
index 4ab7748..e61a0c3 100644
--- a/cli-tcpfwd.c
+++ b/cli-tcpfwd.c
@@ -35,7 +35,6 @@
static int newtcpforwarded(struct Channel * channel);
const struct ChanType cli_chan_tcpremote = {
- 1, /* sepfds */
"forwarded-tcpip",
newtcpforwarded,
NULL,
@@ -51,7 +50,6 @@ static int cli_localtcp(const char* listenaddr,
const char* remoteaddr,
unsigned int remoteport);
static const struct ChanType cli_chan_tcplocal = {
- 1, /* sepfds */
"direct-tcpip",
tcp_prio_inithandler,
NULL,
@@ -275,10 +273,10 @@ static int newtcpforwarded(struct Channel * channel) {
}
channel->prio = DROPBEAR_CHANNEL_PRIO_UNKNOWABLE;
-
+
snprintf(portstring, sizeof(portstring), "%u", fwd->connectport);
channel->conn_pending = connect_remote(fwd->connectaddr, portstring, channel_connect_done, channel, NULL, NULL);
-
+
err = SSH_OPEN_IN_PROGRESS;
out: