887953
From 8eb95b2ebdedd61e7784cf2f18b9564d2d4ed0b9 Mon Sep 17 00:00:00 2001
887953
From: Milind Changire <mchangir@redhat.com>
887953
Date: Thu, 13 Dec 2018 10:11:58 +0530
887953
Subject: [PATCH 468/493] core: move invalid port logs to DEBUG log level
887953
887953
Stop spamming "invalid port" logs in case sysadmin has reserved a large
887953
number of ports.
887953
887953
manline:
887953
> Change-Id: I244ef7693560cc404b36cadc6b05d92ec0e908d3
887953
> fixes: bz#1656517
887953
> Signed-off-by: Milind Changire <mchangir@redhat.com>
887953
> Reviewed-on: https://review.gluster.org/c/glusterfs/+/21809
887953
887953
Change-Id: I244ef7693560cc404b36cadc6b05d92ec0e908d3
887953
BUG: 1656217
887953
Signed-off-by: Milind Changire <mchangir@redhat.com>
887953
Reviewed-on: https://code.engineering.redhat.com/gerrit/158483
887953
Tested-by: RHGS Build Bot <nigelb@redhat.com>
887953
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
887953
---
887953
 libglusterfs/src/common-utils.c | 2 +-
887953
 1 file changed, 1 insertion(+), 1 deletion(-)
887953
887953
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
887953
index 25600a9..1243754 100644
887953
--- a/libglusterfs/src/common-utils.c
887953
+++ b/libglusterfs/src/common-utils.c
887953
@@ -3373,7 +3373,7 @@ gf_ports_reserved (char *blocked_port, unsigned char *ports, uint32_t ceiling)
887953
                 if (blocked_port[strlen(blocked_port) -1] == '\n')
887953
                         blocked_port[strlen(blocked_port) -1] = '\0';
887953
                 if (gf_string2int32 (blocked_port, &tmp_port1) == 0) {
887953
-                        if (tmp_port1 > ceiling
887953
+                        if (tmp_port1 > GF_PORT_MAX
887953
                             || tmp_port1 < 0) {
887953
                                 gf_msg ("glusterfs-socket", GF_LOG_WARNING, 0,
887953
                                         LG_MSG_INVALID_PORT, "invalid port %d",
887953
-- 
887953
1.8.3.1
887953