diff options
author | Richard Wareing <rwareing@fb.com> | 2015-03-05 21:16:40 -0800 |
---|---|---|
committer | Shreyas Siravara <sshreyas@fb.com> | 2016-12-07 20:02:02 -0800 |
commit | 0e75c988f02b4fe36a99d34e5039d61c0ab1b64f (patch) | |
tree | 6acb8fec546297fbac9defa7371f2ffde4ee7802 /cli/src/cli.c | |
parent | cc9c18dc066a9e8f1020acc421dbefc3550d3ea5 (diff) |
gluster: IPv6 single stack support
Summary:
- This diff changes all locations in the code to prefer inet6 family
instead of inet. This will allow change GlusterFS to operate
via IPv6 instead of IPv4 for all internal operations while still
being able to serve (FUSE or NFS) clients via IPv4.
- The changes apply to NFS as well.
- This diff ports D1892990, D1897341 & D1896522 to the 3.8 branch.
Test Plan: Prove tests!
Reviewers: dph, rwareing
Signed-off-by: Shreyas Siravara <sshreyas@fb.com>
Change-Id: I34fdaaeb33c194782255625e00616faf75d60c33
Reviewed-on: http://review.gluster.org/16059
Reviewed-by: Shreyas Siravara <sshreyas@fb.com>
Tested-by: Shreyas Siravara <sshreyas@fb.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
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 518ae265f22..77d2a410fb4 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -588,6 +588,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; @@ -623,7 +628,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; } |