diff options
-rw-r--r-- | cli/src/cli-cmd-parser.c | 4 | ||||
-rw-r--r-- | libglusterfs/src/xlator.c | 16 | ||||
-rw-r--r-- | rpc/rpc-lib/src/rpc-transport.c | 7 |
3 files changed, 15 insertions, 12 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 11b9cbcb98b..66e5643fcb9 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -97,6 +97,10 @@ cli_cmd_bricks_parse (const char **words, int wordcount, int brick_index, GF_FREE (host_name); goto out; } + if (!valid_host_name(host_name, strlen(host_name))) { + cli_out ("internet address '%s' does not comform to " + "standards", host_name); + } GF_FREE (host_name); tmp_list = gf_strdup (brick_list + 1); if (free_list_ptr) { diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index b9952120ddb..b18641449ee 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -619,10 +619,8 @@ _volume_option_value_validate_attacherr (xlator_t *xl, break; case GF_OPTION_TYPE_INTERNET_ADDRESS: { - if (valid_internet_address (pair->value->data)) { - ret = 0; - } else { - gf_log (xl->name, GF_LOG_ERROR, "internet address '%s'" + if (!valid_internet_address (pair->value->data)) { + gf_log (xl->name, GF_LOG_WARNING, "internet address '%s'" " does not conform to standards.", pair->value->data); @@ -632,8 +630,8 @@ _volume_option_value_validate_attacherr (xlator_t *xl, pair->value->data); *op_errstr = gf_strdup (errstr); - goto out; } + ret = 0; } break; case GF_OPTION_TYPE_ANY: @@ -1019,14 +1017,12 @@ _volume_option_value_validate (xlator_t *xl, break; case GF_OPTION_TYPE_INTERNET_ADDRESS: { - if (valid_internet_address (pair->value->data)) { - ret = 0; - } else { - gf_log (xl->name, GF_LOG_ERROR, "internet address '%s'" + if (!valid_internet_address (pair->value->data)) { + gf_log (xl->name, GF_LOG_WARNING, "internet address '%s'" " does not conform to standards.", pair->value->data); - goto out; } + ret = 0; } break; case GF_OPTION_TYPE_ANY: diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index e8b56678bd9..87011470b89 100644 --- a/rpc/rpc-lib/src/rpc-transport.c +++ b/rpc/rpc-lib/src/rpc-transport.c @@ -388,9 +388,12 @@ __volume_option_value_validate (char *name, break; case GF_OPTION_TYPE_INTERNET_ADDRESS: { - if (valid_internet_address (pair->value->data)) { - ret = 0; + if (!valid_internet_address (pair->value->data)) { + gf_log (name, GF_LOG_ERROR, + "internet address '%s' does not conform to" + "standards.", pair->value->data); } + ret = 0; } break; case GF_OPTION_TYPE_ANY: |