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

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Mon Oct 17 04:33:47 EST 2011


https://bugzilla.mindrot.org/show_bug.cgi?id=1943

             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
        AssignedTo: unassigned-bugs at mindrot.org
        ReportedBy: ricky at rzhou.org


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.   This patch makes client_setup_stdio_fwd not
get called the first time if need_controlpersist_detach is set, and
lets
it happen through the master process.

-- 
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list