|
|
7f4c2a |
From b3352ec7322fc590cc9fa9090eb2a7a9dcd198cc Mon Sep 17 00:00:00 2001
|
|
|
7f4c2a |
From: Krishnan Parthasarathi <kparthas@redhat.com>
|
|
|
7f4c2a |
Date: Fri, 10 Jul 2015 19:19:39 +0530
|
|
|
7f4c2a |
Subject: [PATCH 228/234] glusterd: use a real host name (instead of numeric) when we have one
|
|
|
7f4c2a |
|
|
|
7f4c2a |
Change-Id: Ie9cc201204d3d613e3e585cab066a07283db902c
|
|
|
7f4c2a |
BUG: 1241904
|
|
|
7f4c2a |
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
|
|
|
7f4c2a |
Reviewed-on: http://review.gluster.org/11587
|
|
|
7f4c2a |
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
|
|
|
7f4c2a |
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
|
|
|
7f4c2a |
Tested-by: Gluster Build System <jenkins@build.gluster.com>
|
|
|
7f4c2a |
Reviewed-on: https://code.engineering.redhat.com/gerrit/52786
|
|
|
7f4c2a |
Reviewed-by: Shyam Ranganathan <srangana@redhat.com>
|
|
|
7f4c2a |
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
|
|
|
7f4c2a |
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
|
|
|
7f4c2a |
---
|
|
|
7f4c2a |
xlators/mgmt/glusterd/src/glusterd-utils.c | 6 ++++++
|
|
|
7f4c2a |
1 files changed, 6 insertions(+), 0 deletions(-)
|
|
|
7f4c2a |
|
|
|
7f4c2a |
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
|
7f4c2a |
index d2a110c..7781773 100644
|
|
|
7f4c2a |
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
|
7f4c2a |
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
|
7f4c2a |
@@ -4283,6 +4283,7 @@ glusterd_remote_hostname_get (rpcsvc_request_t *req, char *remote_host, int len)
|
|
|
7f4c2a |
char *name = NULL;
|
|
|
7f4c2a |
char *hostname = NULL;
|
|
|
7f4c2a |
char *tmp_host = NULL;
|
|
|
7f4c2a |
+ char *canon = NULL;
|
|
|
7f4c2a |
int ret = 0;
|
|
|
7f4c2a |
|
|
|
7f4c2a |
name = req->trans->peerinfo.identifier;
|
|
|
7f4c2a |
@@ -4297,6 +4298,11 @@ glusterd_remote_hostname_get (rpcsvc_request_t *req, char *remote_host, int len)
|
|
|
7f4c2a |
goto out;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
+ if ((gf_get_hostname_from_ip(hostname, &canon) == 0) && canon) {
|
|
|
7f4c2a |
+ GF_FREE(tmp_host);
|
|
|
7f4c2a |
+ tmp_host = hostname = canon;
|
|
|
7f4c2a |
+ }
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
strncpy (remote_host, hostname, strlen (hostname));
|
|
|
7f4c2a |
|
|
|
7f4c2a |
|
|
|
7f4c2a |
--
|
|
|
7f4c2a |
1.7.1
|
|
|
7f4c2a |
|