diff options
Diffstat (limited to 'cli/src/cli.c')
-rw-r--r-- | cli/src/cli.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c index 84ce0f46cb9..0c019aabfa3 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -442,6 +442,12 @@ cli_opt_parse(char *opt, struct cli_state *state) return 0; } + oarg = strtail(opt, "inet6"); + if (oarg) { + state->address_family = "inet6"; + return 0; + } + oarg = strtail(opt, "log-file="); if (oarg) { state->log_file = oarg; @@ -688,6 +694,11 @@ cli_rpc_init(struct cli_state *state) this = THIS; cli_rpc_prog = &cli_prog; + /* If address family specified in CLI */ + if (state->address_family) { + addr_family = state->address_family; + } + /* Connect to glusterd using the specified method, giving preference * to a unix socket connection. If nothing is specified, connect to * the default glusterd socket. |