[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Patch] Add forward-listening feature (tcpip-forward)


Hello Vic,

The patch is almost perfect. Just these lines :
+  rc = packet_wait(session, SSH2_MSG_REQUEST_SUCCESS, 1);
+  if (rc) {
+    if (session->in_packet.type == SSH2_MSG_REQUEST_FAILURE) {
Could you please check rc for SSH_ERROR and return it to the caller ?

I also wonder how you catch the incoming connections from the server.

Thanks,

Aris

Vic Lee a écrit :
Hi,

So I complete another feature I need for libssh. For your review, this
patch added three new API:

o channel_forward_listen : send tcpip-forward global request

o channel_forward_accept : accept/poll an incoming connection (the codes
were merge with channel_accept_x11 with a static function
channel_accept)

o channel_forward_cancel : send cancel-tcpip-forward global request

During testing I also encounter openssh server sending back a
SSH2_MSG_DEBUG message, and I have to modify packet.c to bypass this
message.

The only thing that I am not able to test is to use 0 as port number,
and the server is supposed to return an available port number, but
openssh server simply reject it. Anyway, I don't need to use 0 port
number and all the rest are working fine for me.

Thanks,

Vic

References:
[Patch] Add forward-listening feature (tcpip-forward)Vic Lee <llyzs@xxxxxxx>
Archive administrator: postmaster@lists.cynapses.org