aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/sysctl.c
diff options
context:
space:
mode:
authorChuck Lever <cel@netapp.com>2005-08-25 19:25:54 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-09-23 12:38:50 -0400
commit529b33c6db0120126b1381faa51406dc463acdc9 (patch)
tree4856a23687aa891f6a5d1c45db80190b90b0fc68 /net/sunrpc/sysctl.c
parent555ee3af161b037865793bd4bebc06b58daafde6 (diff)
[PATCH] RPC: allow RPC client's port range to be adjustable
Select an RPC client source port between 650 and 1023 instead of between 1 and 800. The old range conflicts with a number of network services. Provide sysctls to allow admins to select a different port range. Note that this doesn't affect user-level RPC library behavior, which still uses 1 to 800. Based on a suggestion by Olaf Kirch <okir@suse.de>. Test-plan: Repeated mount and unmount. Destructive testing. Idle timeouts. Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/sysctl.c')
-rw-r--r--net/sunrpc/sysctl.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c
index ef483262f17f..d0c9f460e411 100644
--- a/net/sunrpc/sysctl.c
+++ b/net/sunrpc/sysctl.c
@@ -121,9 +121,16 @@ done:
121 121
122unsigned int xprt_udp_slot_table_entries = RPC_DEF_SLOT_TABLE; 122unsigned int xprt_udp_slot_table_entries = RPC_DEF_SLOT_TABLE;
123unsigned int xprt_tcp_slot_table_entries = RPC_DEF_SLOT_TABLE; 123unsigned int xprt_tcp_slot_table_entries = RPC_DEF_SLOT_TABLE;
124unsigned int xprt_min_resvport = RPC_DEF_MIN_RESVPORT;
125EXPORT_SYMBOL(xprt_min_resvport);
126unsigned int xprt_max_resvport = RPC_DEF_MAX_RESVPORT;
127EXPORT_SYMBOL(xprt_max_resvport);
128
124 129
125static unsigned int min_slot_table_size = RPC_MIN_SLOT_TABLE; 130static unsigned int min_slot_table_size = RPC_MIN_SLOT_TABLE;
126static unsigned int max_slot_table_size = RPC_MAX_SLOT_TABLE; 131static unsigned int max_slot_table_size = RPC_MAX_SLOT_TABLE;
132static unsigned int xprt_min_resvport_limit = RPC_MIN_RESVPORT;
133static unsigned int xprt_max_resvport_limit = RPC_MAX_RESVPORT;
127 134
128static ctl_table debug_table[] = { 135static ctl_table debug_table[] = {
129 { 136 {
@@ -180,6 +187,28 @@ static ctl_table debug_table[] = {
180 .extra1 = &min_slot_table_size, 187 .extra1 = &min_slot_table_size,
181 .extra2 = &max_slot_table_size 188 .extra2 = &max_slot_table_size
182 }, 189 },
190 {
191 .ctl_name = CTL_MIN_RESVPORT,
192 .procname = "min_resvport",
193 .data = &xprt_min_resvport,
194 .maxlen = sizeof(unsigned int),
195 .mode = 0644,
196 .proc_handler = &proc_dointvec_minmax,
197 .strategy = &sysctl_intvec,
198 .extra1 = &xprt_min_resvport_limit,
199 .extra2 = &xprt_max_resvport_limit
200 },
201 {
202 .ctl_name = CTL_MAX_RESVPORT,
203 .procname = "max_resvport",
204 .data = &xprt_max_resvport,
205 .maxlen = sizeof(unsigned int),
206 .mode = 0644,
207 .proc_handler = &proc_dointvec_minmax,
208 .strategy = &sysctl_intvec,
209 .extra1 = &xprt_min_resvport_limit,
210 .extra2 = &xprt_max_resvport_limit
211 },
183 { .ctl_name = 0 } 212 { .ctl_name = 0 }
184}; 213};
185 214