OpenSSH
[Top] [All Lists]

Re: X forwarding: trying to forward to busy local port

To: Lars Kruse <kruse@silicann.com>
Subject: Re: X forwarding: trying to forward to busy local port
From: Darren Tucker <dtucker@zip.com.au>
Date: Thu, 08 Feb 2007 14:18:37 +1100
Cc: openssh-unix-dev@mindrot.org
Delivered-to: sp-com-lists@consult.net
Delivered-to: openssh-unix-dev-list1@securepoint.com
Delivered-to: openssh-unix-dev-tmda@mindrot.org
Delivered-to: openssh-unix-dev@mindrot.org
In-reply-to: <20070205143850.7e0dd8c4@jackdaw.neusy>
List-archive: <http://lists.mindrot.org/pipermail/openssh-unix-dev>
List-help: <mailto:openssh-unix-dev-request@mindrot.org?subject=help>
List-id: Development of portable OpenSSH <openssh-unix-dev.mindrot.org>
List-post: <mailto:openssh-unix-dev@mindrot.org>
List-subscribe: <http://lists.mindrot.org/mailman/listinfo/openssh-unix-dev>, <mailto:openssh-unix-dev-request@mindrot.org?subject=subscribe>
List-unsubscribe: <http://lists.mindrot.org/mailman/listinfo/openssh-unix-dev>, <mailto:openssh-unix-dev-request@mindrot.org?subject=unsubscribe>
References: <20070201162824.6d5f8b77@jackdaw.neusy> <20070205124711.1ba64d02@jackdaw.neusy> <20070205123455.GA27701@gate.dtucker.net> <20070205143850.7e0dd8c4@jackdaw.neusy>
Sender: openssh-unix-dev-bounces+openssh-unix-dev-list1=securepoint.com@mindrot.org
User-agent: Thunderbird 1.5.0.9 (Windows/20061207)
Lars Kruse wrote:
> Hi,
> 
>> Do you have X11UseLocalhost set in sshd_config?  If so, what does
>> "localhost" resolve to?
> the setting "X11UseLocalhost" is not defined in our sshd_config - so it
> should be the default value "yes".
> 
>  jackdaw:~ # grep localhost /etc/hosts
>  127.0.0.1       localhost
>  ::1             ip6-localhost ip6-loopback
> 
> So "localhost" should resolve to the ipv4 address.

Not necessarily: if nsswitch.conf goes to DNS first you might resolve 
"localhost" to an AAAA record for ::1 (or alternate between IP4 and IP6, 
which might explain what you're seeing).

>> If you can afford to do so you could try running without the ipv6
>> stack loaded.
> good idea!
> I tried it ("AddressFamily inet") successfully: now busy ports are
> skipped (as expected).
> 
> 
> Maybe the ipv4 port should be checked in x11_create_display_inet, too?
> (if "AddressFamily" is "any")

I don't think that should be necessary: the system should return the 
sockets of the same AF when asked for the same thing (but glancing 
briefly at the code, sshd just passes a NULL address to getaddrinfo, so 
unless libc does a lookup for "localhost" I'm not sure what's really 
going on here.)

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
     Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
http://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

<Prev in Thread] Current Thread [Next in Thread>