GNOME Bugzilla – Bug 457324
XDMCP chooser doesn't forward the client IP address to the server
Last modified: 2010-06-16 20:39:07 UTC
Hi, Vincent Rivière reported in Debian bug http://bugs.debian.org/432763: """ After selecting a server in the list, the connection times out, and the list is displayed again. I enabled the debug traces on the chooser machine and I found some interesting things : Jul 11 21:12:14 quartz gdm[4198]: gdm_xdmcp_decode: Received opcode INDIRECT_QUERY from client ::ffff:192.168.0.155 Jul 11 21:12:14 quartz gdm[4198]: gdm_xdmcp_handle_query: Opcode 3 from ::ffff:192.168.0.155 Jul 11 21:12:14 quartz gdm[4198]: gdm_xdmcp_host_allow: client->hostname is 192.168.0.155 Jul 11 21:12:14 quartz gdm[4198]: gdm_xdmcp_send_forward_query: Sending forward query to 10.2.0.9 Jul 11 21:12:14 quartz gdm[4198]: gdm_xdmcp_send_forward_query: Query contains 0.0.0.0:3030 We can see that gdm_xdmcp_send_forward_query() sends 0.0.0.0 as the address of the client (X server). I replaced /usr/sbin/gdm and /usr/lib/gdm/gdmchooser with the versions found on stable, and it works again. Now, the good traces are : Jul 11 21:42:15 quartz gdm[4421]: gdm_xdmcp_decode: Received opcode INDIRECT_QUERY from client 192.168.0.155 Jul 11 21:42:15 quartz gdm[4421]: gdm_xdmcp_handle_query: Opcode 3 from 192.168.0.155 Jul 11 21:42:15 quartz gdm[4421]: gdm_xdmcp_host_allow: client->hostname is pcriviere.iut-rodez.fr Jul 11 21:42:15 quartz gdm[4421]: gdm_xdmcp_send_forward_query: Sending forward query to 10.2.0.9 Jul 11 21:42:15 quartz gdm[4421]: gdm_xdmcp_send_forward_query: Query contains 192.168.0.155:3201 We can see 2 things : - The correct address of the client is now forwarded to the server - The IP addresses are displayed in IPV4 form, instead of IPV6 in the bad traces. So maybe this problem is related to some IPV6 compilation settings ? """ I clarified that this also happens with the fixes from bug #455190. Bye,
Hello. I recompiled /usr/sbin/gdm from the Debian Sources 2.18.3-4, the problem is the same. I added some traces in daemon/xdmcp.c, and I got some clues : Line 839: /* or send forward query to chosen host */ #ifdef ENABLE_IPV6 if (clnt_sa->ss_family == AF_INET6 && id != NULL && id->chosen_host6 != NULL) In my case: clnt_sa->ss_family == AF_INET6 is true id != NULL is true id->chosen_host6 != NULL is false So gdm_xdmcp_send_forward_query() is called (not gdm_xdmcp_send_forward_query6()), and the client IP address (in IPV6 form ?) is not forwarded. Here is the interfaces configuration on my gdm host : # ifconfig eth0 Link encap:Ethernet HWaddr 00:13:72:F6:E4:9C inet addr:10.2.0.10 Bcast:10.2.255.255 Mask:255.255.0.0 inet6 addr: fe80::213:72ff:fef6:e49c/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:279858 errors:0 dropped:0 overruns:0 frame:0 TX packets:243217 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:107034199 (102.0 MiB) TX bytes:183557324 (175.0 MiB) Base address:0xbcc0 Memory:fe2e0000-fe300000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:10237 errors:0 dropped:0 overruns:0 frame:0 TX packets:10237 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:66730872 (63.6 MiB) TX bytes:66730872 (63.6 MiB) I looked for recent modifications of the sources inside the SVN repository, and I found this: http://svn.gnome.org/viewcvs/gdm2/branches/gnome-2-18/daemon/xdmcp.c?r1=4684&r2=4996 That modification seems to be the cause of my problem. It was intented to fix the bug #436725 which was about a crash after the XDMCP chooser. I'm very surprised, because I used the chooser for 1 year on Debian Testing without any problem. Now, that bug is fixed, and it doesn't work for me anymore :-( Vincent
The bug was real but in "unstable"... I think you never get the version that has the bug i have reported. I was thinking that the bug was fixed... Maybe it is fixed for me (IPV4/localhost) but not for you... Anyway, i will try to reproduce the bug tonight, but i have slightly change my configuration and it is possible that the bug won't show up anymore. Regards Sylvain Le Gall ps: i will be on vacation from july 25th to Aug 1st
Any update?
Again, any update?
I still need to disable IPV6 in the sources and recompile to get it work. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=432763#42
Created attachment 98736 [details] [review] patch to try does this patch help?
Hello Brian. Thank you for your patch. Unfortunately, the Debian Testing sources are quite different, the patch does not apply. Debian Testing uses GDM gdm-2.18.4. Would it be possible to do the same patch with the Debian version ? Regards, Vincent
In that case, I suspect the patch won't help. In the 2.18 version you'll notice that the code is #ifdef'ed so that it should compute the right size. The patch fixes a problem introduced in 2.20. Does compiling the code with or without ipv6 support make a difference?
Note the --enable-ipv6=[yes/no] configure option. That's how you change it between supporting ipv4 or ipv6. You might have some problems using ipv4 if compiled with ipv6 or vice versa.
In order to get it work, I used to comment out the following line in the file config.h.in : /*#undef ENABLE_IPV6*/ It seems that running configure with --enable-ipv6=no does the same. You're right: by default, the sources are compiled with IPV6 support, and it behaves bad when an IPV4 "client" tries to use the chooser.
Could you test with GDM 2.20.2 and let me know if it works better? Lots of XDMCP fixes lately.
Hello, Brian. Sorry for this late answer, but it the problem is on my production server, I wasn't able to make tests easily. I've just setup a test environment using VMware, now I can reproduce the bug and make tests very easily ! My test environment : - A desktop PC with MS Windows running VMware Workstation - Debian running inside VMware - Cygwin X server running from outside the VM On the Cygwin command-line, I type "X -indirect <VM address>". It works fine with "X -query <VM address>" Indirect calls works fine with gdm 2.18 patched compiled with IPV4 only. So the new tests : I have installed GDM 2.20.2-1 from Debian Unstable. The problem is still here in the official binaries. But it is worse than ever, the problem is still here if I recompile gdm without IPV6 ! I was unable to find a workaround this time. I looked at the sources, it seems that the patch proposed in Comment #6 has already been applied. I saw interesting things in Ethereal. When I select a host in the Chooser, some XDMCP packets are sent. "XDMCP Indirect_query" packets seems good. They are sent from Cygwin to the VM. But "XDMCP Forward_query" packets seems bad : They are sent from the VM to a totally bogus IPV4 address ! This is the same when gdm 2.20 is compiled without IPV6.
Does turning on debug=Enable provide any useful debug information. If you have any ideas on how to improve the code so it doesn't fail, please let us know.
Thanks for taking the time to report this bug. However, you are using a version that is too old and not supported anymore. GNOME developers are no longer working on that version, so unfortunately there will not be any bug fixes for the version that you use. By upgrading to a newer version of GNOME you could receive bug fixes and new functionality. You may need to upgrade your Linux distribution to obtain a newer version of GNOME. Please feel free to reopen this bug if the problem still occurs with a newer version of GNOME.