[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#4757: marked as done (xdm: XDMCP problem with X servers on multihomed hosts (design flaw?))



Your message dated Mon, 4 Dec 2006 11:03:44 -0060
with message-id <01c71793$dd250250$6c822ecf@undergraduatemicrofiches>
and subject line fwd: Mcdowell
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: xbase
Version: 3.1.2-9

I have an X server running on a machine with two different network
interfaces (ethernet and ppp) onto separate networks.

I've been trying to get that X server to talk to an xdm on one of
those networks (ppp), by using X -query <name-of-xdm-host>.

This appears to work correctly (XDMCP UDP packets are exchanged) until
xdm tries to make an actual X connection to the X server.  It seems
that xdm has synthesised a DISPLAY value containing the hostname of
the X server's ethernet interface, by doing a reverse lookup of an IP
address provided by the X server (both the X server and xdm have
access to name/address mappings for all the interfaces involved, all
of which have distinct canonical names and reverse map correctly).

Examining the source code I can see that XDMCP has a facility for the
X server to tell its address to xdm, other than by having xdm examine
the IP headers on the (UDP) XDMCP query.  This message has room for
several addresses in different address families (connection types in
X speak).

I presume that this facility is there so that an X server which
supports several different connection types can advertise them all,
and xdm can pick the right one.

However:

(a) the X server always advertises all of its IP interfaces in this
message, in the order they were configured.

(b) the function in xdm which is supposed to choose which entry from
the table to pick always returns 0, so that the first entry is always
used.

In my situation this causes xdm to try to make an X connection to the
X server's ethernet interface, which doesn't work (because the two
networks are partitioned).

There appear to be no options to X or xdm which help the situation.

Interestingly, the X server does have access to a more appropriate
address: when it does XDMCP it uses a UDP socket to send packets to
the xdm's ppp interface and the kernel does select an appropriate
source address: the X server's ppp interface.

I've managed to find a workaround: using LD_PRELOAD to override ioctl
so that SIOCGIFCONFIG (used by the X server to find which interfaces
are available) doesn't return the ethernet interface at all.  However
this is a horrible hack.

I'm not entirely sure, but I think that the right fix is something
like the following:

* xdm should have a way to configure `preferred' addresses, much as
  named does for returning RRs.
* xdm should try all the addresses it has been given in order, and its
  timeout for going on to the next one should be shorter than the X
  server's timeout for giving up on the XDMCP session.
* xdm should disregard addresses with connection types it doesn't
  understand (at the moment it doesn't appear to do this).

* X should make sure that the local address of the UDP port it's using
  to communicate with xdm is first on the list of addresses it
  advertises.
* X should have an option to specify which local address to use.

An alternative strategy would be:

* X should only advertise one address with each connection type.
* If it has many possible addresses to choose from X should try doing
  a session with each.
* X should try the local address it is using for its XDMCP session
  first.
* X should have a way to specify an order for the interfaces it
  advertises; there needs to be a default (which just overrides the
  list from SIOCGIFCONFIG) and an overriding version (which can
  override the local end of the XDMCP session too).

* xdm should skip down the list of addresses until it finds a type it
  supports.  (Currently I believe it will fail if the first connection
  type advertised is not supported.)

What the strategy should be will need to be decided globally, perhaps
by fiat by the X consortium if there is no obvious right answer to
those who know this area better than I do.

Ian.

PS: I'm using the xdm from Debian's xbase 3.1.2-9 and the XF86_S3 from
3.1.2-5.

--- End Message ---
--- Begin Message ---
Smart Money Equities would like to thank our valued
readers for making 2006 a great year.  Please continue
to support Smart Money Equities by visiting our sponsors
and featured advertisers.  Here's our next Hot Pick!


Company: Premium Petroleum, Inc.

Symbol: PPTL
Current Price: Around $0.01
Target Price: $0.06

A major release is coming out or the company this week.
While we can't divulge the complete report we can say
that it is going to push this one much higher!

PPTL will be benefiting from a massive PR campaign that
will have investors lining up to get in.  We are giving
our members the heads up early so that you can get the
maximum benefit!
It's first day of this campaign you know what will happend
next several days...

Go Smart Money!


--- End Message ---

Reply to: