[H-GEN] xdm and multiple interfaces

Craig Eldershaw ce at comlab.ox.ac.uk
Tue Mar 14 05:57:12 EST 2000


[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics.  Please observe the list's charter.          ]

Hi,

I'm having problems using the xdmc protocol with a machine with mutiple
network interfaces.

There are two machines: 

 - Sad is running xdm
 - Happy is running an X xerver (XFree86) 

Happy connects using 'X -query Sad'.  All is OK.  

Unfortunately Happy actually has two network interfaces, IPs and hostnames
(Happy and Happy2).  So too does Sad (whose other face is Sad2).
Happy and Sad are linked, so too are Happy2 and Sad2 (I can't see that
it's relevant, but Happy and Sad are both ethernet interfaces, H2-S2 is
ppp).  Happy and Sad are both the interfaces for the default route (not
Happy2 and Sad2).

What I want is for all the X stuff to go via the Happy2-Sad2 link, not
the Happy-Sad link.

It would seem obvious to simply do 'X -query Sad2' and ensure that
xdm's Xaccess file grants access to Happy2.  But this only partly works.


IF: xdm is configured to allow Happy, but refuse Happy2, then

   '-query Sad' will succeed.  This is good. [*]
   '-query Sad2' will fail.  This is good.

IF: xdm is configured to allow Happy2, but refuse Happy, then 

   '-query Sad' will fail.  This is good.
   '-query Sad2' will succeed.  This is good. [*]

So what's my problem ?  Well in either of [*], after initial setup, all
communications ends up going via the H-S link.  The initial negotiation
correctly identifies the source (H or H2) and acts appropriately, but
then it always "reverts" to H-S link.

Running xdm with '-debug 1 -nodaemon' gives the interesting line
   Computed display name: Happy:0
with either [*].  

So (it appears) the Xserver on Happy/2 is telling xdm on Sad/2 that its
name is "Happy".  I've spent a lot of time wading through the Xserver
and xdm sources (and boy there's a lot of source there...).  The best
I have found is where the server seems to use uname(2) followed by
gethostbyname(2) to list all aliases and then register them with the
xdmcp side of things.

Ahah !  So all I have to do is ensure that uname returns "Happy2"
rather than "Happy" - hostname(1) should do this.  Unfortunately it
hasn't helped.

This is slowly driving me mad.  Any suggestions (or reccomendations of
psychaitrists) appreciated.

Cheers,
	Craig.

--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.



More information about the General mailing list