summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2010-03-29 00:37:11 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-03-31 01:40:57 -0700
commit286b913e6335d23796883e729e014b486817f38c (patch)
tree71827ee157710f80047158bc355d6cdd49ee57f3
parente7427294479f8492f4d28a98cbbea80c8ab6317b (diff)
libglusterfs/transport: no need to set address-family if one is not set in the configuration family.
- if not set, address family defaults to AF_UNSPEC and getaddrinfo will fill appropriate address family for transport types tcp/socket. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 693 (glusterfs 3.0.2 will not listen on IPv6 address) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=693
-rw-r--r--libglusterfs/src/transport.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/libglusterfs/src/transport.c b/libglusterfs/src/transport.c
index e78e67b..c7d1256 100644
--- a/libglusterfs/src/transport.c
+++ b/libglusterfs/src/transport.c
@@ -41,7 +41,6 @@ transport_load (dict_t *options,
xlator_t *xl)
{
struct transport *trans = NULL, *return_trans = NULL;
- char *addr_family = NULL;
char *name = NULL;
void *handle = NULL;
char *type = NULL;
@@ -66,26 +65,9 @@ transport_load (dict_t *options,
if (ret < 0)
gf_log ("dict", GF_LOG_DEBUG,
"setting transport-type failed");
- ret = dict_get_str (options, "transport.address-family",
- &addr_family);
- if (ret < 0) {
- ret = dict_get_str (options, "address-family",
- &addr_family);
- }
-
- if (ret < 0) {
- ret = dict_set_str (options,
- "transport.address-family",
- "inet");
- if (ret < 0) {
- gf_log ("dict", GF_LOG_ERROR,
- "setting address-family failed");
- }
- }
-
gf_log ("transport", GF_LOG_WARNING,
"missing 'option transport-type'. defaulting to "
- "\"socket\" (%s)", addr_family?addr_family:"inet");
+ "\"socket\"");
} else {
{
/* Backword compatibility to handle * /client,
@@ -102,10 +84,6 @@ transport_load (dict_t *options,
if ((is_tcp == 0) ||
(is_unix == 0) ||
(is_ibsdp == 0)) {
- if (is_tcp == 0)
- ret = dict_set_str (options,
- "transport.address-family",
- "inet");
if (is_unix == 0)
ret = dict_set_str (options,
"transport.address-family",