From 7a153f17b1892ca8747d5b570d80795b4006790a Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 14 Sep 2011 13:51:40 +0530 Subject: libglusterfs/common-utils: resolve_ip6() to take AI_ADDRCONFIG AI_ADDRCONFIG flag is needed for 'getaddrinfo()' call as hint so that while resolving a hostname, ip list will be taken from proper configured address family Change-Id: Iad6067ad64444d3930d5be593ca819a8de5fc0c1 BUG: 3548 Reviewed-on: http://review.gluster.com/414 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- libglusterfs/src/common-utils.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libglusterfs/src') diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index 6955f7322be..6ee32cac747 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -117,6 +117,7 @@ gf_resolve_ip6 (const char *hostname, memset(&hints, 0, sizeof(hints)); hints.ai_family = family; hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = AI_ADDRCONFIG; ret = gf_asprintf (&port_str, "%d", port); if (-1 == ret) { -- cgit