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: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
1c69dedc8f
commit
2932bcda07
@@ -107,8 +107,8 @@ struct netns_ipv4 {
|
|||||||
#ifdef CONFIG_NET_L3_MASTER_DEV
|
#ifdef CONFIG_NET_L3_MASTER_DEV
|
||||||
u8 sysctl_raw_l3mdev_accept;
|
u8 sysctl_raw_l3mdev_accept;
|
||||||
#endif
|
#endif
|
||||||
int sysctl_tcp_early_demux;
|
u8 sysctl_tcp_early_demux;
|
||||||
int sysctl_udp_early_demux;
|
u8 sysctl_udp_early_demux;
|
||||||
|
|
||||||
u8 sysctl_nexthop_compat_mode;
|
u8 sysctl_nexthop_compat_mode;
|
||||||
|
|
||||||
|
|||||||
@@ -389,7 +389,7 @@ static int proc_tcp_early_demux(struct ctl_table *table, int write,
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
ret = proc_dointvec(table, write, buffer, lenp, ppos);
|
ret = proc_dou8vec_minmax(table, write, buffer, lenp, ppos);
|
||||||
|
|
||||||
if (write && !ret) {
|
if (write && !ret) {
|
||||||
int enabled = init_net.ipv4.sysctl_tcp_early_demux;
|
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;
|
int ret = 0;
|
||||||
|
|
||||||
ret = proc_dointvec(table, write, buffer, lenp, ppos);
|
ret = proc_dou8vec_minmax(table, write, buffer, lenp, ppos);
|
||||||
|
|
||||||
if (write && !ret) {
|
if (write && !ret) {
|
||||||
int enabled = init_net.ipv4.sysctl_udp_early_demux;
|
int enabled = init_net.ipv4.sysctl_udp_early_demux;
|
||||||
@@ -683,14 +683,14 @@ static struct ctl_table ipv4_net_table[] = {
|
|||||||
{
|
{
|
||||||
.procname = "udp_early_demux",
|
.procname = "udp_early_demux",
|
||||||
.data = &init_net.ipv4.sysctl_udp_early_demux,
|
.data = &init_net.ipv4.sysctl_udp_early_demux,
|
||||||
.maxlen = sizeof(int),
|
.maxlen = sizeof(u8),
|
||||||
.mode = 0644,
|
.mode = 0644,
|
||||||
.proc_handler = proc_udp_early_demux
|
.proc_handler = proc_udp_early_demux
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.procname = "tcp_early_demux",
|
.procname = "tcp_early_demux",
|
||||||
.data = &init_net.ipv4.sysctl_tcp_early_demux,
|
.data = &init_net.ipv4.sysctl_tcp_early_demux,
|
||||||
.maxlen = sizeof(int),
|
.maxlen = sizeof(u8),
|
||||||
.mode = 0644,
|
.mode = 0644,
|
||||||
.proc_handler = proc_tcp_early_demux
|
.proc_handler = proc_tcp_early_demux
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user