Commit ec48b5ea authored by Mantas Mikulenas's avatar Mantas Mikulenas Committed by Max Kellermann

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.
parent 75401554
...@@ -372,9 +372,6 @@ server_socket_add_host(struct server_socket *ss, const char *hostname, ...@@ -372,9 +372,6 @@ server_socket_add_host(struct server_socket *ss, const char *hostname,
struct addrinfo hints; struct addrinfo hints;
memset(&hints, 0, sizeof(hints)); memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_PASSIVE; hints.ai_flags = AI_PASSIVE;
#ifdef AI_ADDRCONFIG
hints.ai_flags |= AI_ADDRCONFIG;
#endif
hints.ai_family = PF_UNSPEC; hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM; hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = IPPROTO_TCP; hints.ai_protocol = IPPROTO_TCP;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment