summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGaurav Yadav <gyadav@redhat.com>2017-05-22 23:25:47 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2017-06-13 14:20:32 +0000
commit169a64f7066a5d079c60e816a81325094ed8ad74 (patch)
tree94677ac3ccd0fdeacfea6867fb9b866aa46f347c /tests
parent5936593b8240867b1114384b68148994b82c9d3f (diff)
libglusterfs : Fix crash in glusterd while peer probing
glusterd crashes when port is being set explcitly to a range which is outside greater than short data type range. Eg. sysctl net.ipv4.ip_local_reserved_ports="49152-49156" In above case glusterd crashes while parsing the port. With this fix glusterd will be able to handle port range between INT_MIN to INT_MAX > Reviewed-on: https://review.gluster.org/17359 > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Samikshan Bairagya <samikshan@gmail.com> > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> > Reviewed-by: Niels de Vos <ndevos@redhat.com> > Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> Change-Id: I7c75ee67937b0e3384502973d96b1c36c89e0fe1 BUG: 1459759 Signed-off-by: Gaurav Yadav <gyadav@redhat.com> Reviewed-on: https://review.gluster.org/17496 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Samikshan Bairagya <samikshan@gmail.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/glusterd/bug-1454418-seg-fault.t25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/bugs/glusterd/bug-1454418-seg-fault.t b/tests/bugs/glusterd/bug-1454418-seg-fault.t
new file mode 100644
index 00000000000..eafaa55ede8
--- /dev/null
+++ b/tests/bugs/glusterd/bug-1454418-seg-fault.t
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../cluster.rc
+
+
+cleanup;
+
+## Setting Port number in specific range
+sysctl net.ipv4.ip_local_reserved_ports="24007-24008,32765-32768,49152-49156"
+
+## Start a 2 node virtual cluster
+TEST launch_cluster 2;
+
+
+## Peer probe server 2 from server 1 cli
+TEST $CLI_1 peer probe $H2;
+
+EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count
+
+sysctl net.ipv4.ip_local_reserved_ports="
+"
+
+cleanup;
+