Bug#432227: gdm: getaddrinfo fails when ipv6 is enabled
Loïc Minier
lool at dooz.org
Wed Jul 11 14:24:47 UTC 2007
On Wed, Jul 11, 2007, E L wrote:
> The patch I sent you is against the source I got from apt-get source gdm
> for
> 2.18.3-3.
> The problem still happen in that version and after building it with the
> patch I sent you the problem disappear.
I don't understand; after I apply your patch to a patched source tree
(which you can get with: QUILT_PATCHES=debian/patches quilt push -a),
the code looks like this:
#ifdef ENABLE_IPV6
memset (&hints, 0, sizeof (hints));
hints.ai_socktype = SOCK_DGRAM;
hints.ai_flags = AI_CANONNAME;
hostbuf[BUFSIZ-1] = '\0';
if (gethostname (hostbuf, BUFSIZ-1) != 0) {
gdm_debug ("%s: Could not get server hostname", "gdm_peek_local_address_list");
sin6 = g_new0 (struct sockaddr_in6, 1);
sin6->sin6_family = AF_INET6;
sin6->sin6_addr = in6addr_loopback;
return g_list_append (the_list, sin6);
}
memset (&hints, 0, sizeof (hints));
hints.ai_family = AF_INET;
hints.ai_family |= AF_INET6;
if (getaddrinfo (hostbuf, NULL, &hints, &result) != 0) {
gdm_debug ("%s: Could not get address from hostname!", "gdm_peek_local_address_list");
As you see, there's a superfluous memset() from the two.
How are you building the Debian source? With dpkg-buildpackage?
--
Loïc Minier
More information about the pkg-gnome-maintainers
mailing list