Skip to content

Commit e08ea3a

Browse files
fsorensontrondmypd
authored andcommitted
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>
1 parent 5d71899 commit e08ea3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/sunrpc/xprtsock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ static struct ctl_table xs_tunables_table[] = {
124124
.mode = 0644,
125125
.proc_handler = proc_dointvec_minmax,
126126
.extra1 = &xprt_min_resvport_limit,
127-
.extra2 = &xprt_max_resvport_limit
127+
.extra2 = &xprt_max_resvport
128128
},
129129
{
130130
.procname = "max_resvport",
131131
.data = &xprt_max_resvport,
132132
.maxlen = sizeof(unsigned int),
133133
.mode = 0644,
134134
.proc_handler = proc_dointvec_minmax,
135-
.extra1 = &xprt_min_resvport_limit,
135+
.extra1 = &xprt_min_resvport,
136136
.extra2 = &xprt_max_resvport_limit
137137
},
138138
{

0 commit comments

Comments
 (0)