--- gdm-2.20.0/daemon/misc.c 2007-11-14 17:48:24.000000000 +0200 +++ gdm-without-the-patch/gdm-2.20.0/daemon/misc.c 2007-09-17 16:45:50.000000000 +0200 @@ -921,25 +921,16 @@ } memset (&hints, 0, sizeof (hints)); - - hints.ai_family = AF_INET; #ifdef ENABLE_IPV6 hints.ai_family |= AF_INET6; #endif - -#ifdef ENABLE_IPV6 - if (getaddrinfo (hostbuf, NULL, &hints, &result) != 0) { - hints.ai_family = AF_INET; -#endif if (getaddrinfo (hostbuf, NULL, &hints, &result) != 0) { gdm_debug ("%s: Could not get address from hostname!", "gdm_peek_local_address_list"); + return NULL; } -#ifdef ENABLE_IPV6 - } -#endif for (res = result; res != NULL; res = res->ai_next) { struct sockaddr_storage *sa;