diff options
author | Varun Shastry <vshastry@redhat.com> | 2012-08-28 18:11:43 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2012-09-18 05:06:58 -0700 |
commit | 5d67526f6028d75a57056dc83d2e3086cec8779b (patch) | |
tree | d152255a636d39e8ed476074a423075c1f07c6ba /cli | |
parent | db2b6e73fa35dc0a44eb7f7d5f3943891444903b (diff) |
cli/: Filter out the loopback address for brick creation.
Don't create the volumes with brick address 0.0.0.0 to 0.255.255.255
(http://en.wikipedia.org/wiki/Reserved_IP_addresses)
Change-Id: Ic5464ec370bddf498a5220acf2d367b877e21e66
BUG: 787627
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/3865
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/cli-cmd-parser.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 322d4d9ad07..3b81792dc2c 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -97,9 +97,11 @@ cli_cmd_bricks_parse (const char **words, int wordcount, int brick_index, } if (!(strcmp (host_name, "localhost") && - strcmp (host_name, "127.0.0.1"))) { + strcmp (host_name, "127.0.0.1") && + strncmp (host_name, "0.", 2))) { cli_err ("Please provide a valid hostname/ip other " - "than localhost or 127.0.0.1"); + "than localhost, 127.0.0.1 or loopback " + "address (0.0.0.0 to 0.255.255.255)."); ret = -1; GF_FREE (tmp_host); goto out; |