diff options
author | Aravinda VK <avishwan@redhat.com> | 2019-03-14 20:06:54 +0530 |
---|---|---|
committer | Aravinda VK <avishwan@redhat.com> | 2019-03-15 14:23:46 +0530 |
commit | 240e1d6821fbb779c3dd73f6f0225d755a5b7cc6 (patch) | |
tree | f40d2f0ff2b30afdfaae21c31b1325ba7196c01f /cli/src/cli.c | |
parent | 3f3da526333b91c787b2388319cb16297b4d8cc3 (diff) |
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=<ipv6>`.
Fixes: bz#1688833
Change-Id: I1e0d42cae07158df043e64a2f991882d8c897837
Signed-off-by: Aravinda VK <avishwan@redhat.com>
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. |