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 | |
| 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')
| -rw-r--r-- | cli/src/cli.c | 11 | ||||
| -rw-r--r-- | cli/src/cli.h | 1 | 
2 files changed, 12 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. 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 {  | 
