LocalForward and RemoteForward bind patch

Damien Miller djm at mindrot.org
Fri Aug 6 13:29:56 EST 2004


Ben Lindstrom wrote:

> 
> On Fri, 6 Aug 2004, Damien Miller wrote:
> 
> 
>>Jeff Hansen wrote:
>>
>>
>>>FINALLY, it's here.
>>>
>>>You can now tell SSH which address to bind to for every single port
>>>forwarding option!  This patch allows you to pass the following as ssh
>>>command line options:
>>
>>There has been a patch to do just this for a little while. It just
>>needs testing before we merge it.
>>
>>http://bugzilla.mindrot.org/show_bug.cgi?id=413
>>
> 
> [.. in channels.c ..]
> @@ -2312,7 +2333,14 @@
> 
>  	/* Send the forward request to the remote side. */
>  	if (compat20) {
> -		const char *address_to_bind = "0.0.0.0";
> +		const char *address_to_bind;
> +		if (listen_host == NULL)
> +			address_to_bind = "127.0.0.1";
> +		else if (listen_host[0] == '\0' || strcmp(listen_host,
> "*")==0)
> [..]
> 
> Ain't it a bit wrong to hard code 127.0.0.1 here without consulting if we
> are in ipv4 vs ipv6 mode?   I assume this would break if the person is
> assuming pure ipv6 connection everywhere.

Yes - that is one of the outstanding issues in the bug (my
characterization of it "just needing testing" was overly optimistic)

-d




More information about the openssh-unix-dev mailing list