diff options
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 707533efea6..b8934c45ab6 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -6461,6 +6461,7 @@ glusterd_remote_hostname_get (rpcsvc_request_t *req, char *remote_host, int len)          char *name = NULL;          char *hostname = NULL;          char *tmp_host = NULL; +        char *canon = NULL;          int  ret = 0;          name = req->trans->peerinfo.identifier; @@ -6475,6 +6476,11 @@ glusterd_remote_hostname_get (rpcsvc_request_t *req, char *remote_host, int len)                  goto out;          } +        if ((gf_get_hostname_from_ip(hostname,&canon) == 0) && canon) { +                GF_FREE(tmp_host); +                tmp_host = hostname = canon; +        } +          strncpy (remote_host, hostname, strlen (hostname)); | 
