summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2017-10-13 16:53:51 +0530
committerAmar Tumballi <amarts@redhat.com>2017-11-15 10:01:34 +0000
commit306344a1cc1d2569a00b9f1926a944a7790a9222 (patch)
treee3e71d0227bf0fe18495b1385a345c15c9a604ed /xlators/protocol/server/src
parent5f5d166e89367dc0d72fa02ca4e8ca2d28a06cdd (diff)
libglusterfs/options: Add new member 'setkey' to xlator options
The 'setkey' will be used as the key by GD2 when setting the option during volgen. 'setkey' also supports using varstrings. This is mainly to be used for options, which use a different key for 'volume set' and in volfiles. For eg. the 'auth.*' options of protocol/server. The protocol/server xlator has been updated to make use of this for the auth.allow and auth.reject options. Updates #302 Change-Id: I1fd2fd69625c9db48595bd3f494c221625255169 Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/protocol/server/src')
-rw-r--r--xlators/protocol/server/src/server.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index a7fe3b2..f4da6a5 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -1716,14 +1716,17 @@ struct volume_options options[] = {
/* The following two options are defined in addr.c, redifined here *
* for the sake of validation during volume set from cli */
- { .key = {"auth.addr.*.allow"},
+ { .key = {"auth.addr.*.allow", "auth.allow"},
+ .setkey = "auth.addr.{{ brick.path }}.allow",
+ .default_value = "*",
.type = GF_OPTION_TYPE_INTERNET_ADDRESS_LIST,
.description = "Allow a comma separated list of addresses and/or "
"hostnames to connect to the server. Option "
"auth.reject overrides this option. By default, all "
"connections are allowed."
},
- { .key = {"auth.addr.*.reject"},
+ { .key = {"auth.addr.*.reject", "auth.reject"},
+ .setkey = "auth.addr.{{ brick.path }}.reject",
.type = GF_OPTION_TYPE_INTERNET_ADDRESS_LIST,
.description = "Reject a comma separated list of addresses and/or "
"hostnames to connect to the server. This option "