Re: [gdm-list] [PATCH] fix indirect xdmcp with ipv6
- From: Brian Cameron <Brian Cameron Sun COM>
- To: Ludwig Nussel <ludwig nussel suse de>
- Cc: gdm-list gnome org
- Subject: Re: [gdm-list] [PATCH] fix indirect xdmcp with ipv6
- Date: Wed, 31 Jan 2007 12:45:05 +0800
Ludwig:
Thanks for the patches. Though in the future could you please send
patches as attachments or (better yet) attach them to bugs in
bugzilla.gnome.org. Since these patches were not attachments, I had
to apply them by hand, which was a bit of a pain. I applied them to
SVN head and to GNOME 2.16 branch (aside from a few changes that were
specific to head in daemon/misc.c and daemon/errorgui.c).
Anyway, I did not apply a few of your changes to daemon/verify-pam.c
since they caused warnings to show up in Solaris. If you want to
rework that patch so that the current code is surrounded by
#ifdef __sun
...
#else
your code
#endif
Then I would accept it, so it works on Solaris and Linux.
I also did some code cleanup in daemon/xdmcp.c since its formatting
is ugly. It's still not great, but better than it was.
Brian
Selecting a host in the chooser caused an assertion in gdm because
it called gdm_xdmcp_send_forward_query also for IPv6 addresses.
cu
Ludwig
Index: gdm2/daemon/xdmcp.c
===================================================================
--- gdm2.orig/daemon/xdmcp.c
+++ gdm2/daemon/xdmcp.c
@@ -755,11 +755,23 @@ gdm_xdmcp_handle_query (struct sockaddr_
list = list->next;
}
} else {
- /* or send forward query to chosen host */
- gdm_xdmcp_send_forward_query
- (id, (struct sockaddr_in *)clnt_sa,
- &(((struct sockaddr_in *)clnt_sa)->sin_addr),
- &clnt_authlist);
+#ifdef ENABLE_IPV6
+ if(clnt_sa->ss_family == AF_INET6)
+ {
+ gdm_xdmcp_send_forward_query6
+ (id, (struct sockaddr_in6 *)clnt_sa,
+ &(((struct sockaddr_in6 *)clnt_sa)->sin6_addr),
+ &clnt_authlist);
+ }
+ else
+#endif
+ {
+ /* or send forward query to chosen host */
+ gdm_xdmcp_send_forward_query
+ (id, (struct sockaddr_in *)clnt_sa,
+ &(((struct sockaddr_in *)clnt_sa)->sin_addr),
+ &clnt_authlist);
+ }
}
} else if (id == NULL) {
id = gdm_choose_indirect_alloc (clnt_sa);
@@ -794,7 +806,7 @@ gdm_xdmcp_send_forward_query6 (GdmIndire
char buffer6[INET6_ADDRSTRLEN];
g_assert (id != NULL);
- g_assert (id->chosen_host != NULL);
+ g_assert (id->chosen_host6 != NULL);
gdm_debug ("gdm_xdmcp_send_forward_query6: Sending forward query to %s", inet_ntop (AF_INET6, &(id->chosen_host6), buffer6, sizeof (buffer6)));
gdm_debug ("gdm_xdmcp_send_forward_query6: Query contains %s:%d", inet_ntop (AF_INET6, display_addr, buffer6, sizeof (buffer6)), (int) ntohs (clnt_sa->sin6_port));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]