Permalink
Browse files

Retrieve reachable addresses only.

AI_ADDRCONFIG helps not to try to connect unreachable ipv6 address if
user doesn't have ipv6 network stack.
  • Loading branch information...
youknowone committed Jun 4, 2013
1 parent 5ea3793 commit 6198f383f469b39a00dc9a75f797e4b7241ccbca
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/common/network.c
View
@@ -201,7 +201,7 @@ net_resolve (netstore * ns, char *hostname, int port, char **real_host)
memset (&hints, 0, sizeof (struct addrinfo));
hints.ai_family = PF_UNSPEC; /* support ipv6 and ipv4 */
- hints.ai_flags = AI_CANONNAME;
+ hints.ai_flags = AI_CANONNAME | AI_ADDRCONFIG;
hints.ai_socktype = SOCK_STREAM;
if (port == 0)

0 comments on commit 6198f38

Please sign in to comment.