Commit 2932bcda authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

inet: convert tcp_early_demux and udp_early_demux to u8



For these sysctls, their dedicated helpers have
to use proc_dou8vec_minmax().

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1c69dedc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -107,8 +107,8 @@ struct netns_ipv4 {
#ifdef CONFIG_NET_L3_MASTER_DEV
	u8 sysctl_raw_l3mdev_accept;
#endif
	int sysctl_tcp_early_demux;
	int sysctl_udp_early_demux;
	u8 sysctl_tcp_early_demux;
	u8 sysctl_udp_early_demux;

	u8 sysctl_nexthop_compat_mode;

+4 −4
Original line number Diff line number Diff line
@@ -389,7 +389,7 @@ static int proc_tcp_early_demux(struct ctl_table *table, int write,
{
	int ret = 0;

	ret = proc_dointvec(table, write, buffer, lenp, ppos);
	ret = proc_dou8vec_minmax(table, write, buffer, lenp, ppos);

	if (write && !ret) {
		int enabled = init_net.ipv4.sysctl_tcp_early_demux;
@@ -405,7 +405,7 @@ static int proc_udp_early_demux(struct ctl_table *table, int write,
{
	int ret = 0;

	ret = proc_dointvec(table, write, buffer, lenp, ppos);
	ret = proc_dou8vec_minmax(table, write, buffer, lenp, ppos);

	if (write && !ret) {
		int enabled = init_net.ipv4.sysctl_udp_early_demux;
@@ -683,14 +683,14 @@ static struct ctl_table ipv4_net_table[] = {
	{
		.procname       = "udp_early_demux",
		.data           = &init_net.ipv4.sysctl_udp_early_demux,
		.maxlen         = sizeof(int),
		.maxlen         = sizeof(u8),
		.mode           = 0644,
		.proc_handler   = proc_udp_early_demux
	},
	{
		.procname       = "tcp_early_demux",
		.data           = &init_net.ipv4.sysctl_tcp_early_demux,
		.maxlen         = sizeof(int),
		.maxlen         = sizeof(u8),
		.mode           = 0644,
		.proc_handler   = proc_tcp_early_demux
	},