OpenSSH
[Top] [All Lists]

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

To: openssh-unix-dev@mindrot.org
Subject: Re: X forwarding: trying to forward to busy local port
From: Lars Kruse <kruse@silicann.com>
Date: Wed, 14 Feb 2007 11:43:22 +0100
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: <20070213113532.GA31234@gate.dtucker.net>
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>
Organization: Silicann Technologies
References: <20070201162824.6d5f8b77@jackdaw.neusy> <20070213114912.5d3a76a4@jackdaw.neusy> <20070213113532.GA31234@gate.dtucker.net>
Sender: openssh-unix-dev-bounces+openssh-unix-dev-list1=securepoint.com@mindrot.org
Hi,

> > 1) improved "is this port usable on all interfaces?"-detection
> > ipv4/ipv6 mixed openssh daemons should behave like pure ipv4 daemons:
> > unusable DISPLAY settings may never be offered to clients
> 
> I think it's a Linuxism: IPv6 sockets prevent binding to IPv4 sockets
> on the same port but not vice versa.
hm - I do not know any details regarding this behaviour ...

To make sure, that you understand me right, I was studying the source
code of "x11_create_display_inet" in "channel.c" again.
If I am not mistaken, then the loop
   for (ai = aitop; ai; ai = ai->ai_next)
tries to connect to all available ports according to the given
restrictions (especially: address family). If at least one port is
usable, then this one is used for the X session.


Case 1: both ipv4 and ipv6 socket of a given port are available
no problem - both sockets are bound for the X session.

Case 2: only the ipv4 socket of the port is available
no problem - as the display "localhost:???" (ipv4 address) is returned,
clients will only connect to the ipv4 port, anyway.

Case 3: only the ipv6 socket of the port is available
this seems to be a problem: an ipv6 port is bound, but an ipv4 address
is returned as the display setting (DISPLAY=localhost:??? instead of
DISPLAY=ip6-localhost:???).


Could it be, that the return value of the DISPLAY setting does not
depend on the acquired sockets for now? (always returning an ip4
address)

Or did I misunderstand something?

regards,
Lars
_______________________________________________
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>