summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2021-05-25 04:49:42 +0200
committerDavid S. Miller <davem@davemloft.net>2021-05-26 00:18:29 +0200
commitb2540cdce6e22ecf3de54daf5129cc37951348cc (patch)
tree689d36769d986ceb766645cf62b5f6d9d9390026 /net/sctp
parentsctp: add the missing setting for asoc encap_port (diff)
downloadlinux-b2540cdce6e22ecf3de54daf5129cc37951348cc.tar.xz
linux-b2540cdce6e22ecf3de54daf5129cc37951348cc.zip
sctp: fix the proc_handler for sysctl encap_port
proc_dointvec() cannot do min and max check for setting a value when extra1/extra2 is set, so change it to proc_dointvec_minmax() for sysctl encap_port. Fixes: e8a3001c2120 ("sctp: add encap_port for netns sock asoc and transport") Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/sysctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
index e92df779af73..55871b277f47 100644
--- a/net/sctp/sysctl.c
+++ b/net/sctp/sysctl.c
@@ -307,7 +307,7 @@ static struct ctl_table sctp_net_table[] = {
.data = &init_net.sctp.encap_port,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_dointvec_minmax,
.extra1 = SYSCTL_ZERO,
.extra2 = &udp_port_max,
},