Changes in channel_connect_to

Damien Miller djm at mindrot.org
Fri Jul 11 17:51:41 EST 2008


On Wed, 9 Jul 2008, rapier wrote:

> I just want to make sure I'm interpreting this correctly.
> 
> In 5.0 channel_connect_to would only return the requested socket. You'd 
> then need to use this socket to create the channel with with channel_new.
> 
> In 5.1 channel_connect_to doesn't return the socket but rolls in 
> channel_new and now returns the channel directly. The usage of 
> channel_new hasn't changed though, only channel_connect_to.
> 
> Is that about right? Are the any subtleties I'm missing?

Most of the changes are in the connect_to(). Much of its logic has 
been remvoed to connect_next() to support fallback to trying additional
addresses when the initial connect fails. 

To support this, connect_to fills in the channel->connect_ctx with
the addresses of the host that it is trying to connect to. On a
connect error, channel_post_connecting() can call connect_next() with
this structure to pick the next address to try rather than just failing.

-d


More information about the openssh-unix-dev mailing list