diff mbox series

[net] net/ipv4: fix sysctl max for fib_multipath_hash_policy

Message ID 9b97a07518c119e531de8ab012d95a8f3feea038.1574080178.git.marcelo.leitner@gmail.com
State Accepted
Delegated to: David Miller
Headers show
Series [net] net/ipv4: fix sysctl max for fib_multipath_hash_policy | expand

Commit Message

Marcelo Ricardo Leitner Nov. 18, 2019, 12:46 p.m. UTC
Commit eec4844fae7c ("proc/sysctl: add shared variables for range
check") did:
-               .extra2         = &two,
+               .extra2         = SYSCTL_ONE,
here, which doesn't seem to be intentional, given the changelog.
This patch restores it to the previous, as the value of 2 still makes
sense (used in fib_multipath_hash()).

Fixes: eec4844fae7c ("proc/sysctl: add shared variables for range check")
Cc: Matteo Croce <mcroce@redhat.com>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
---
 net/ipv4/sysctl_net_ipv4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Matteo Croce Nov. 18, 2019, 1:02 p.m. UTC | #1
On Mon, Nov 18, 2019 at 1:46 PM Marcelo Ricardo Leitner
<marcelo.leitner@gmail.com> wrote:
>
> Commit eec4844fae7c ("proc/sysctl: add shared variables for range
> check") did:
> -               .extra2         = &two,
> +               .extra2         = SYSCTL_ONE,
> here, which doesn't seem to be intentional, given the changelog.
> This patch restores it to the previous, as the value of 2 still makes
> sense (used in fib_multipath_hash()).
>

Nice catch.
Somehow a chunk in 363887a2cdfeb was partially reverted.

Acked-by: Matteo Croce <mcroce@redhat.com>
David Miller Nov. 19, 2019, 1:27 a.m. UTC | #2
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Date: Mon, 18 Nov 2019 09:46:09 -0300

> Commit eec4844fae7c ("proc/sysctl: add shared variables for range
> check") did:
> -               .extra2         = &two,
> +               .extra2         = SYSCTL_ONE,
> here, which doesn't seem to be intentional, given the changelog.
> This patch restores it to the previous, as the value of 2 still makes
> sense (used in fib_multipath_hash()).
> 
> Fixes: eec4844fae7c ("proc/sysctl: add shared variables for range check")
> Cc: Matteo Croce <mcroce@redhat.com>
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>

Applied and queued up for -stable, thanks.
diff mbox series

Patch

diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 59ded25acd045d90573eb144381df4381ecba837..0902cb32bbad69f77b93f5c4175f37ad706d1cde 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -1037,7 +1037,7 @@  static struct ctl_table ipv4_net_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_fib_multipath_hash_policy,
 		.extra1		= SYSCTL_ZERO,
-		.extra2		= SYSCTL_ONE,
+		.extra2		= &two,
 	},
 #endif
 	{