diff -aur glusterfs-3.5.0-ORG/libglusterfs/src/common-utils.c glusterfs-3.5.0/libglusterfs/src/common-utils.c --- glusterfs-3.5.0-ORG/libglusterfs/src/common-utils.c 2014-04-17 09:17:07.000000000 +0200 +++ glusterfs-3.5.0/libglusterfs/src/common-utils.c 2014-06-17 11:56:47.322942063 +0200 @@ -170,7 +170,6 @@ int32_t gf_resolve_ip6 (const char *hostname, uint16_t port, - int family, void **dnscache, struct addrinfo **addr_info) { @@ -206,7 +205,6 @@ hostname); memset(&hints, 0, sizeof(hints)); - hints.ai_family = family; hints.ai_socktype = SOCK_STREAM; #ifndef __NetBSD__ hints.ai_flags = AI_ADDRCONFIG; diff -aur glusterfs-3.5.0-ORG/rpc/rpc-transport/rdma/src/name.c glusterfs-3.5.0/rpc/rpc-transport/rdma/src/name.c --- glusterfs-3.5.0-ORG/rpc/rpc-transport/rdma/src/name.c 2014-04-17 09:17:07.000000000 +0200 +++ glusterfs-3.5.0/rpc/rpc-transport/rdma/src/name.c 2014-06-17 11:57:33.790985961 +0200 @@ -27,7 +27,6 @@ int32_t gf_resolve_ip6 (const char *hostname, uint16_t port, - int family, void **dnscache, struct addrinfo **addr_info); @@ -239,7 +238,6 @@ /* TODO: gf_resolve is a blocking call. kick in some non blocking dns techniques */ ret = gf_resolve_ip6 (remote_host, remote_port, - sockaddr->sa_family, &this->dnscache, &addr_info); if (ret == -1) { gf_log (this->name, GF_LOG_ERROR, diff -aur glusterfs-3.5.0-ORG/rpc/rpc-transport/socket/src/name.c glusterfs-3.5.0/rpc/rpc-transport/socket/src/name.c --- glusterfs-3.5.0-ORG/rpc/rpc-transport/socket/src/name.c 2014-04-17 09:17:07.000000000 +0200 +++ glusterfs-3.5.0/rpc/rpc-transport/socket/src/name.c 2014-06-17 11:58:43.844702937 +0200 @@ -26,7 +26,6 @@ int32_t gf_resolve_ip6 (const char *hostname, uint16_t port, - int family, void **dnscache, struct addrinfo **addr_info); @@ -243,7 +242,7 @@ /* TODO: gf_resolve is a blocking call. kick in some non blocking dns techniques */ ret = gf_resolve_ip6 (remote_host, remote_port, - sockaddr->sa_family, &this->dnscache, &addr_info); + &this->dnscache, &addr_info); if (ret == -1) { gf_log (this->name, GF_LOG_ERROR, "DNS resolution failed on host %s", remote_host); @@ -515,9 +514,7 @@ ret = -1; } - if (*sa_family == AF_UNSPEC) { - *sa_family = sockaddr->sa_family; - } + *sa_family = sockaddr->sa_family; err: return ret; @@ -597,9 +594,7 @@ break; } - if (*sa_family == AF_UNSPEC) { - *sa_family = addr->sa_family; - } + *sa_family = addr->sa_family; err: return ret;