Skip to contentSkip to conversation

net: fix icmp_echo_enable_probe sysctl

PATCH Applied Eric Dumazet 3 participants 3 messages Mar 30, 2021 – Mar 31, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: fix icmp_echo_enable_probe sysctl

From: Eric Dumazet <[email protected]>

sysctl_icmp_echo_enable_probe is an u8.

ipv4_net_table entry should use
.maxlen = sizeof(u8).
.proc_handler = proc_dou8vec_minmax,

Cc Andreas Roeseler <[email protected]>
---
 net/ipv4/sysctl_net_ipv4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/ipv4/sysctl_net_ipv4.c +2 -2
index e3cb2d96b55e99f4322a99abb6a6da866dffcf4d..9199f507a005efc3f57ca0225d3898bfa5d01c53 100644
@@ -601,9 +601,9 @@ static struct ctl_table ipv4_net_table[] = {
 	{
 		.procname	= "icmp_echo_enable_probe",
 		.data		= &init_net.ipv4.sysctl_icmp_echo_enable_probe,
-		.maxlen		= sizeof(int),
+		.maxlen		= sizeof(u8),
 		.mode		= 0644,
-		.proc_handler	= proc_dointvec_minmax,
+		.proc_handler	= proc_dou8vec_minmax,
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE
 	},
Signature · 1 line
2.31.0.291.g576ba9dcdaf-goog
#1 lore raw
Quoted 9 lines · Eric Dumazet

From: Eric Dumazet <[email protected]>

sysctl_icmp_echo_enable_probe is an u8.

ipv4_net_table entry should use
.maxlen = sizeof(u8).
.proc_handler = proc_dou8vec_minmax,

I should have added the following tag :

Fixes f1b8fa9fa586 ("net: add sysctl for enabling RFC 8335 PROBE messages")
Quoted 25 lines
Cc Andreas Roeseler <[email protected]>
---
 net/ipv4/sysctl_net_ipv4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/ipv4/sysctl_net_ipv4.c +2 -3
index e3cb2d96b55e99f4322a99abb6a6da866dffcf4d..9199f507a005efc3f57ca0225d3898bfa5d01c53 100644
@@ -601,9 +601,9 @@ static struct ctl_table ipv4_net_table[] = {
        {
                .procname       = "icmp_echo_enable_probe",
                .data           = &init_net.ipv4.sysctl_icmp_echo_enable_probe,
-               .maxlen         = sizeof(int),
+               .maxlen         = sizeof(u8),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec_minmax,
+               .proc_handler   = proc_dou8vec_minmax,
                .extra1         = SYSCTL_ZERO,
                .extra2         = SYSCTL_ONE
        },
--

2.31.0.291.g576ba9dcdaf-goog

#2 lore raw
In reply to Eric Dumazet
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 9 lines · On Tue, 30 Mar 2021 14:06:13 -0700 you wrote:

From: Eric Dumazet <[email protected]>

sysctl_icmp_echo_enable_probe is an u8.

ipv4_net_table entry should use
.maxlen = sizeof(u8).
.proc_handler = proc_dou8vec_minmax,

[...]

Here is the summary with links:
- [net-next] net: fix icmp_echo_enable_probe sysctl

    https://git.kernel.org/netdev/net-next/c/b8128656a5ed

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html