summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2012-06-04 09:56:33 +0530
committerVijay Bellur <vijay@gluster.com>2012-07-03 12:37:13 -0700
commitd3f1007400735812c88353ed6b0a49d9d4d2c7b2 (patch)
tree5df62e342946965d047773470a3eb6334de0522c
parent0c95f6bdb0d934384111aabab0ee2d8980102a50 (diff)
libglusterfs: valid_host_name() fix
Fix valid_host_name() to allow single character hostnames. BUG: 827403 Change-Id: Ie8df0114cee55b0472b83c077b8ac4fc952f5acd Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3516 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--libglusterfs/src/common-utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index 7e7eb4614..3e6543be7 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -1590,7 +1590,7 @@ valid_host_name (char *address, int length)
char *temp_str = NULL;
char *save_ptr = NULL;
- if ((length > _POSIX_HOST_NAME_MAX) || (length == 1)) {
+ if ((length > _POSIX_HOST_NAME_MAX) || (length < 1)) {
ret = 0;
goto out;
}