diff options
author | Jeong YunWon <jeong@youknowone.org> | 2013-06-04 20:19:37 +0900 |
---|---|---|
committer | Jeong YunWon <jeong@youknowone.org> | 2013-06-04 20:19:37 +0900 |
commit | d3a27947fe8acdf60f4ccb0fbdf99441b079435c (patch) | |
tree | 5a9688d707977d71e455e3b0794172b73866c26f /src/common | |
parent | 42e3587fd51b10e987adfcd289ad8ea4b3f74009 (diff) |
Retrieve reachable addresses only.
AI_ADDRCONFIG helps not to try to connect unreachable ipv6 address if user doesn't have ipv6 network stack.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/network.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/network.c b/src/common/network.c index c3390b31..ca0923e1 100644 --- a/src/common/network.c +++ b/src/common/network.c @@ -205,7 +205,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) |