From 240e1d6821fbb779c3dd73f6f0225d755a5b7cc6 Mon Sep 17 00:00:00 2001 From: Aravinda VK Date: Thu, 14 Mar 2019 20:06:54 +0530 Subject: geo-rep: IPv6 support `address_family=inet6` needs to be added while mounting master and slave volumes in gverify script. New option introduced to gluster cli(`--inet6`) which will be used internally by geo-rep while calling `gluster volume info --remote-host=`. Fixes: bz#1688833 Change-Id: I1e0d42cae07158df043e64a2f991882d8c897837 Signed-off-by: Aravinda VK --- cli/src/cli.c | 11 +++++++++++ cli/src/cli.h | 1 + 2 files changed, 12 insertions(+) (limited to 'cli') 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. diff --git a/cli/src/cli.h b/cli/src/cli.h index 5df86d52f81..b79a0a235f3 100644 --- a/cli/src/cli.h +++ b/cli/src/cli.h @@ -136,6 +136,7 @@ struct cli_state { gf_loglevel_t log_level; char *glusterd_sock; + char *address_family; }; struct cli_local { -- cgit