Mailing List Archive

[Bug 1943] New: [PATCH] ssh -W opens two connections when ControlPersist is enabled.

Bug #: 1943
Summary: [PATCH] ssh -W opens two connections when
ControlPersist is enabled.
Classification: Unclassified
Product: Portable OpenSSH
Version: 5.9p1
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: ssh

As reported earlier at

there is some strange interaction between ControlPersist and ssh -W
breaks things if you're using both. Specifically, ssh -W host:port
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. This patch makes client_setup_stdio_fwd not
get called the first time if need_controlpersist_detach is set, and
it happen through the master process.

Configure bugmail:
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
openssh-bugs mailing list