diff options
author | Sunny Kumar <sunkumar@redhat.com> | 2020-01-17 11:03:46 +0000 |
---|---|---|
committer | Sunny Kumar <sunkumar@redhat.com> | 2020-01-17 14:40:17 +0000 |
commit | 485212e858bddd97573a3b2b811357b0d822005a (patch) | |
tree | 4402dbaba73f185f8c5293642e1cd43d60b389cd /geo-replication | |
parent | 6c48f1649d0916ae237fec08f007c8efb6d53e4e (diff) |
geo-rep: Fix ssh-port validation
If non-standard ssh-port is used, Geo-rep can be configured to use ssh port
by using config option, the value should be in allowed port range and non negative.
At present it can accept negative value and outside allowed port range which is incorrect.
Many Linux kernels use the port range 32768 to 61000.
IANA suggests it should be in the range 1 to 2^16 - 1, so keeping the same.
$ gluster volume geo-replication master 127.0.0.1::slave config ssh-port -22
geo-replication config updated successfully
$ gluster volume geo-replication master 127.0.0.1::slave config ssh-port 22222222
geo-replication config updated successfully
This patch fixes the above issue and have added few validations around this
in test cases.
Change-Id: I9875ab3f00d7257370fbac6f5ed4356d2fed3f3c
Fixes: bz#1792276
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'geo-replication')
-rw-r--r-- | geo-replication/gsyncd.conf.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/geo-replication/gsyncd.conf.in b/geo-replication/gsyncd.conf.in index 9155cd87bbe..11e57fdf54f 100644 --- a/geo-replication/gsyncd.conf.in +++ b/geo-replication/gsyncd.conf.in @@ -266,7 +266,9 @@ allowed_values=ERROR,INFO,WARNING,DEBUG [ssh-port] value=22 -validation=int +validation=minmax +min=1 +max=65535 help=Set SSH port type=int |