remote forwarding in 2.9p2
Markus Friedl
markus.friedl at informatik.uni-erlangen.de
Thu Jul 5 09:58:33 EST 2001
openssh-current has
nextstate = (c->host_port == 0 &&
c->type != SSH_CHANNEL_RPORT_LISTENER) ?
SSH_CHANNEL_DYNAMIC : SSH_CHANNEL_OPENING;
On Tue, Jul 03, 2001 at 09:56:22PM -0400, Philippe Levan wrote:
> Hi,
>
> It looks like remote forwarding with SSH v2 is not working
> on my Solaris machines (and from what I understand from the
> source, it may not work elsewhere either).
>
> When looking at channel_post_port_listener() in channels.c,
> I found that nextstate was defined as :
>
> nextstate = (c->host_port == 0) ? SSH_CHANNEL_DYNAMIC :
> SSH_CHANNEL_OPENING;
>
> And later comes the call :
>
> if (nextstate != SSH_CHANNEL_DYNAMIC)
> port_open_helper(nc, rtype);
>
> It turns out that on the server-side, for a channel type
> of SSH_CHANNEL_RPORT_LISTENER, c->host_port is 0 and therefore,
> per the above code, nextstate == SSH_CHANNEL_DYNAMIC and
> port_open_helper() is not called.
>
> I am not sure what the function of SSH_CHANNEL_DYNAMIC is but
> it looks like it has something to do with socks4 (from looking
> at channel_pre_dynamic()) and probably doesn't apply to the
> SSH_CHANNEL_RPORT_LISTENER case. I suspect that nextstate should
> be SSH_CHANNEL_OPENING in order to call port_open_helper().
>
> I tried to make the change :
>
> nextstate = (c->type == SSH_CHANNEL_RPORT_LISTENER) ?
> SSH_CHANNEL_OPENING :
> (c->host_port == 0) ? SSH_CHANNEL_DYNAMIC :
> SSH_CHANNEL_OPENING;
>
> And that seems to work.
>
> Anyone care to check and confirm the fix or point me in the
> right direction ?
>
> Thanks.
>
> Philippe.
>
> ---
> Philippe Levan | Systems Engineering
> levan at epix.net | epix Internet Services
>
More information about the openssh-unix-dev
mailing list