Commit b2540cdc authored by Xin Long's avatar Xin Long Committed by David S. Miller
Browse files

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: e8a3001c ("sctp: add encap_port for netns sock asoc and transport")
Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 297739bd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,
	},