summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-09-14 13:51:40 +0530
committerVijay Bellur <vijay@gluster.com>2011-09-14 01:38:11 -0700
commit7a153f17b1892ca8747d5b570d80795b4006790a (patch)
treeb452d4db150978c7613e024ed580708d913f3aef
parentd705b28fd1bb066632854da493031118776d00df (diff)
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 <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--libglusterfs/src/common-utils.c1
1 files changed, 1 insertions, 0 deletions
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) {