Mercurial > dropbear
comparison svr-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 | 5015c80808c5 |
children | 1d86a58fb52d |
comparison
equal
deleted
inserted
replaced
1828:3f0ac6bc58a1 | 1829:a7cc3332d8ab |
---|---|
57 static int svr_remotetcpreq(int *allocated_listen_port); | 57 static int svr_remotetcpreq(int *allocated_listen_port); |
58 static int newtcpdirect(struct Channel * channel); | 58 static int newtcpdirect(struct Channel * channel); |
59 | 59 |
60 #if DROPBEAR_SVR_REMOTETCPFWD | 60 #if DROPBEAR_SVR_REMOTETCPFWD |
61 static const struct ChanType svr_chan_tcpremote = { | 61 static const struct ChanType svr_chan_tcpremote = { |
62 1, /* sepfds */ | |
63 "forwarded-tcpip", | 62 "forwarded-tcpip", |
64 tcp_prio_inithandler, | 63 tcp_prio_inithandler, |
65 NULL, | 64 NULL, |
66 NULL, | 65 NULL, |
67 NULL, | 66 NULL, |
239 #endif /* DROPBEAR_SVR_REMOTETCPFWD */ | 238 #endif /* DROPBEAR_SVR_REMOTETCPFWD */ |
240 | 239 |
241 #if DROPBEAR_SVR_LOCALTCPFWD | 240 #if DROPBEAR_SVR_LOCALTCPFWD |
242 | 241 |
243 const struct ChanType svr_chan_tcpdirect = { | 242 const struct ChanType svr_chan_tcpdirect = { |
244 1, /* sepfds */ | |
245 "direct-tcpip", | 243 "direct-tcpip", |
246 newtcpdirect, /* init */ | 244 newtcpdirect, /* init */ |
247 NULL, /* checkclose */ | 245 NULL, /* checkclose */ |
248 NULL, /* reqhandler */ | 246 NULL, /* reqhandler */ |
249 NULL, /* closehandler */ | 247 NULL, /* closehandler */ |