summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2010-03-29 00:34:20 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-03-31 01:41:06 -0700
commit391023ddc5bcd1c6b8f2782d8b1c41c614f5e200 (patch)
treef5e6445704d8609b2d4ac79acb2328a639715fd7
parent59a9ad4b3deb9e4025556db430765629d590116f (diff)
libglusterfs/transport: no need to set address-family if one is not set in the configuration family.v3.0.4rc3
- 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 f3175272d12..aee809117b6 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",