summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/common-utils.h
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2012-10-25 17:06:31 +0530
committerVijay Bellur <vbellur@redhat.com>2012-12-03 03:02:55 -0800
commitfa1607ea596802d3d3177d775eeecb0f0e5d496f (patch)
treea8bb59c1d459c5f6f1b90364da80b213f48d8d4f /libglusterfs/src/common-utils.h
parent3cade0a1e9dfc641e5b6db2f044af9f50ff604d6 (diff)
socket,rdma: before binding to any port check if it is a reserved port
* The list of ports which are reserved is obtained by reading the file /proc/sys/net/ipv4/ip_local_reserved_ports. Change-Id: I3a832f53efbb79dd719b34a30cbaf28269f25816 BUG: 762989 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4131 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs/src/common-utils.h')
-rw-r--r--libglusterfs/src/common-utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h
index 183837b96..6d46a9971 100644
--- a/libglusterfs/src/common-utils.h
+++ b/libglusterfs/src/common-utils.h
@@ -76,6 +76,7 @@ void trap (void);
* nfs port in volume status.
*/
#define GF_NFS3_PORT 38467
+#define GF_CLIENT_PORT_CEILING 1024
enum _gf_boolean
{
@@ -553,5 +554,8 @@ uint64_t get_mem_size ();
int gf_strip_whitespace (char *str, int len);
int gf_canonicalize_path (char *path);
char *generate_glusterfs_ctx_id (void);
+char *gf_get_reserved_ports();
+int gf_process_reserved_ports (gf_boolean_t ports[]);
+gf_boolean_t gf_ports_reserved (char *blocked_port, gf_boolean_t *ports);
#endif /* _COMMON_UTILS_H */