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:
parent
754015544f
commit
ec48b5ea3a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user