diff cli-tcpfwd.c @ 1829:a7cc3332d8ab

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
author Matt Johnston <matt@ucc.asn.au>
date Mon, 11 Oct 2021 15:42:14 +0800
parents 9026f976eee8
children 1d86a58fb52d
line wrap: on
line diff
--- a/cli-tcpfwd.c	Mon Oct 11 15:16:54 2021 +0800
+++ b/cli-tcpfwd.c	Mon Oct 11 15:42:14 2021 +0800
@@ -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 @@
 		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 @@
 	}
 
 	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: