diff options
author | Frank Sorenson <sorenson@redhat.com> | 2016-07-08 17:35:24 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-07-19 16:23:27 -0400 |
commit | e08ea3a96fc7112921023b77b737098690a666dc (patch) | |
tree | 6ea644e7f335a2f59613ce6627e2a0566150b342 /net/sunrpc/xprtsock.c | |
parent | 5d71899a26630654d65e143c63c3c6f12d9aa287 (diff) |
sunrpc: Prevent resvport min/max inversion via sysctl
The current min/max resvport settings are independently limited
by the entire range of allowed ports, so max_resvport can be
set to a port lower than min_resvport.
Prevent inversion of min/max values when set through sysctl by
setting the limits dependent on each other.
Signed-off-by: Frank Sorenson <sorenson@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r-- | net/sunrpc/xprtsock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 1adda71f4e3a..2674309770f4 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -124,7 +124,7 @@ static struct ctl_table xs_tunables_table[] = { | |||
124 | .mode = 0644, | 124 | .mode = 0644, |
125 | .proc_handler = proc_dointvec_minmax, | 125 | .proc_handler = proc_dointvec_minmax, |
126 | .extra1 = &xprt_min_resvport_limit, | 126 | .extra1 = &xprt_min_resvport_limit, |
127 | .extra2 = &xprt_max_resvport_limit | 127 | .extra2 = &xprt_max_resvport |
128 | }, | 128 | }, |
129 | { | 129 | { |
130 | .procname = "max_resvport", | 130 | .procname = "max_resvport", |
@@ -132,7 +132,7 @@ static struct ctl_table xs_tunables_table[] = { | |||
132 | .maxlen = sizeof(unsigned int), | 132 | .maxlen = sizeof(unsigned int), |
133 | .mode = 0644, | 133 | .mode = 0644, |
134 | .proc_handler = proc_dointvec_minmax, | 134 | .proc_handler = proc_dointvec_minmax, |
135 | .extra1 = &xprt_min_resvport_limit, | 135 | .extra1 = &xprt_min_resvport, |
136 | .extra2 = &xprt_max_resvport_limit | 136 | .extra2 = &xprt_max_resvport_limit |
137 | }, | 137 | }, |
138 | { | 138 | { |