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

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
......@@ -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;
......
......@@ -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
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment