server_socket: remove AI_ADDRCONFIG

When you pass the flag AI_ADDRCONFIG to getaddrinfo(), it does not
consider address families on the loopback device.  When run on a
machine without an external network card, just with "lo", it was
unable to look up any address.
This commit is contained in:
Mantas Mikulenas 2010-11-04 20:17:45 +01:00 committed by Max Kellermann
parent 754015544f
commit ec48b5ea3a

View File

@ -372,9 +372,6 @@ server_socket_add_host(struct server_socket *ss, const char *hostname,
struct addrinfo hints;
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_PASSIVE;
#ifdef AI_ADDRCONFIG
hints.ai_flags |= AI_ADDRCONFIG;
#endif
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = IPPROTO_TCP;