Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: OpenSSH: Dev

[PATCH] Fix control persist and stdio forward interaction

 

 

OpenSSH dev RSS feed   Index | Next | Previous | View Threaded


ricky at rzhou

Oct 13, 2011, 2:18 AM

Post #1 of 2 (433 views)
Permalink
[PATCH] Fix control persist and stdio forward interaction

As reported earlier at

https://lists.mindrot.org/pipermail/openssh-unix-dev/2011-March/029441.html

there is some strange interaction between ControlPersist and ssh -W that
breaks things if you're using both. Specifically, ssh -W host:port with
ControlPersist enabled opens up two connections to host:port and sends
data from both back.

I think this is happening because channel_connect_stdio_fwd is being
called twice, once in client_setup_stdio_fwd, which is called from
ssh_init_forwarding, and once in process_mux_stdio_fwd, which is
called once the client process starts talking to the master process.

It looks like the way ControlPersist is implemented, the process forks,
with the child becoming the master process and the child making its
connection through that. Thus, it seems like a reasonable fix to not
call client_setup_stdio_fwd if need_controlpersist_detach is set, and
just allow it to happen later.

Does the attached patch look OK?

Thanks,
Ricky


ricky at rzhou

Oct 13, 2011, 2:24 AM

Post #2 of 2 (416 views)
Permalink
Re: [PATCH] Fix control persist and stdio forward interaction [In reply to]

On 2011-10-13 05:18:43 AM, Ricky Zhou wrote:
> Does the attached patch look OK?
Oops, looks like I forgot to attach the patch, so here it is.

Thanks,
Ricky
Attachments: openssh-control_persist_and_stdio_forward.patch (0.80 KB)

OpenSSH dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.