From fa1607ea596802d3d3177d775eeecb0f0e5d496f Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Thu, 25 Oct 2012 17:06:31 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/4131 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- libglusterfs/src/common-utils.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libglusterfs/src/common-utils.h') 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 */ -- cgit