diff options
Diffstat (limited to 'cli/src/cli.c')
-rw-r--r-- | cli/src/cli.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c index 25fe58568a5..ba2ac43d7f3 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -613,6 +613,11 @@ cli_rpc_init (struct cli_state *state) int ret = -1; int port = CLI_GLUSTERD_PORT; xlator_t *this = NULL; +#ifdef IPV6_DEFAULT + char *addr_family = "inet6"; +#else + char *addr_family = "inet"; +#endif this = THIS; cli_rpc_prog = &cli_prog; @@ -648,7 +653,8 @@ cli_rpc_init (struct cli_state *state) goto out; ret = dict_set_str (options, "transport.address-family", - "inet"); + addr_family); + if (ret) goto out; } |