1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-06 05:52:48 -05:00

Remove downstream remote port forwardings in ssh.c too.

Another piece of half-finished machinery that I can't have tested
properly when I set up connection sharing: I had the function
ssh_alloc_sharing_rportfwd which is how sshshare.c asks ssh.c to start
sending it channel-open requests for a given remote forwarded port,
but I had no companion function that removes one of those requests
again when a downstream remote port forwarding goes away (either by
mid-session cancel-tcpip-forward or by the whole downstream
disconnecting).

As a result, the _second_ attempt to set up the same remote port
forwarding, after a sharing downstream had done so once and then
stopped, would quietly fail.
This commit is contained in:
Simon Tatham
2018-06-03 07:54:00 +01:00
parent 314c8f5270
commit 3f1f7c3ce7
3 changed files with 25 additions and 0 deletions

2
ssh.h
View File

@ -38,6 +38,8 @@ unsigned ssh_alloc_sharing_channel(Ssh ssh, void *sharing_ctx);
void ssh_delete_sharing_channel(Ssh ssh, unsigned localid);
int ssh_alloc_sharing_rportfwd(Ssh ssh, const char *shost, int sport,
void *share_ctx);
void ssh_remove_sharing_rportfwd(Ssh ssh, const char *shost, int sport,
void *share_ctx);
void ssh_sharing_queue_global_request(Ssh ssh, void *share_ctx);
struct X11FakeAuth *ssh_sharing_add_x11_display(Ssh ssh, int authtype,
void *share_cs,