Hi!

Am Donnerstag, 25.12.03 um 02:22 Uhr schrieb Torrey Lyons:

Happy Holidays! Your present from the XFree86 Project is the second release candidate of the next major release of XFree86. XFree86 4.4.0 RC2 passes many tests in the xtest suite that failed for RC1. Additionally on Mac OS X, RC2 has full compatibility with quartz-wm in all the languages it is localized in.

I have build XFree86 4.4.0 RC2 on MacOS 10.2.8 and it seems, some compatibility problems have crept into the XDMCP code.


I often use the X server to connect to a remote xdm. This does not work anymore with the 4.4.0 X server.

The first problem I found was, that no XDMCP datagrams arrived on my xdm server. As the reason for this I found out, that at least on MacOSX sendto() does not tolerate its tolen argument being 128 for IPv4 adresses. In xc/programs/Xserver/os/xdmcp.c at the end of send_query_msg(), XdmcpFlush() is called and sizeof (ManagerAddress) is given as the size of the address. On my system, it is 128. XdmcpFlush() passes this parameter to sendto(), which returns EINVAL on my system (BTW, the return code of sendto() in XdmcpFlush() is ignored). When I change XdmcpFlush() to force tolen to 16, the XDMCP datagrams are send and can be seen on the xdm-server using ethereal.

After seeing the XDMCP datagrams, the problem still was not solved. I suddenly got an out of memory error. It turned out, that this error was send from the xdm server. In fact, I use kdm and have installed KED-3.1.1a. The reason for this failure is that in the XDMCP request datagram, a list of connection types and connection addresses is send to the xdm server. It does contain four addresses, three IPv6 addresses and the fourth one is an IPv4 address. Since the kdm was not able to handle IPv6 addresses, an internal function returned NULL, which was converted to "out of memory". This in fact is a problem of kdm, but IMHO the Xserver should avoid triggering this bug.

There might be several ways to avoid this. First, the XDMCP request datagram could only include addresses of the same IP version that XDMCP itself uses. It might cause problems, when the Xserver and xdm are running on the same host and unix:0 is excluded from the address list by this measure.

One could also change the order of addresses in the XDMCP request datagram. I have not tried it, but it seems, that at least kdm does simply use the first address given in the XDMCP request datagram.

After I changed XdmcpRegisterConnection() to ignore IPv6 addresses, I finally managed to get a session running. I usually use the -query <host> -once arguments to Xserver to connect to xdm.

After doing all this debugging, I tried to use -broadcast -once and unfortunately it failed, too. :-( This time, the reason is using a wrong address on the sendto() calls. It uses the address of the X server instead of using a broadcast address.

I started my debugging with RC1 but since RC2 already appeared I decided to do a bug report first without chasing the broadcast bug. Since the code is not in the MacOSX dependent code, I am sending this bug report to [EMAIL PROTECTED] and a copy to [EMAIL PROTECTED]

73, Mario
--
Mario Klebsch                                           [EMAIL PROTECTED]
PGP-Key available at http://www.klebsch.de/public.key
Fingerprint DSS: EE7C DBCC D9C8 5DC1 D4DB  1483 30CE 9FB2 A047 9CE0
 Diffie-Hellman: D447 4ED6 8A10 2C65 C5E5  8B98 9464 53FF 9382 F518

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to