diff options
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/rpc-lib/src/rpc-transport.c | 6 | ||||
-rw-r--r-- | rpc/rpc-transport/socket/src/name.c | 9 |
2 files changed, 5 insertions, 10 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index 0904dbee716..432bf469934 100644 --- a/rpc/rpc-lib/src/rpc-transport.c +++ b/rpc/rpc-lib/src/rpc-transport.c @@ -692,12 +692,6 @@ rpc_transport_inet_options_build (dict_t **options, const char *hostname, "failed to set remote-port with %d", port); goto out; } - ret = dict_set_str (dict, "transport.address-family", "inet"); - if (ret) { - gf_log (THIS->name, GF_LOG_WARNING, - "failed to set addr-family with inet"); - goto out; - } ret = dict_set_str (dict, "transport-type", "socket"); if (ret) { diff --git a/rpc/rpc-transport/socket/src/name.c b/rpc/rpc-transport/socket/src/name.c index 650c5a747be..a8cf04d8ab7 100644 --- a/rpc/rpc-transport/socket/src/name.c +++ b/rpc/rpc-transport/socket/src/name.c @@ -149,9 +149,10 @@ client_fill_address_family (rpc_transport_t *this, sa_family_t *sa_family) if (remote_host_data) { gf_log (this->name, GF_LOG_DEBUG, - "address-family not specified, guessing it " - "to be inet from (remote-host: %s)", data_to_str (remote_host_data)); - *sa_family = AF_INET; + "address-family not specified, marking it as unspec " + "for getaddrinfo to resolve from (remote-host: %s)", + data_to_str(remote_host_data)); + *sa_family = AF_UNSPEC; } else { gf_log (this->name, GF_LOG_DEBUG, "address-family not specified, guessing it " @@ -395,7 +396,7 @@ af_inet_server_get_local_sockaddr (rpc_transport_t *this, memset (&hints, 0, sizeof (hints)); hints.ai_family = addr->sa_family; hints.ai_socktype = SOCK_STREAM; - hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; + hints.ai_flags = AI_PASSIVE; ret = getaddrinfo(listen_host, service, &hints, &res); if (ret != 0) { |