]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: Fix sysctl max for fib_multipath_hash_policy
authorIdo Schimmel <idosch@nvidia.com>
Wed, 2 Sep 2020 13:16:59 +0000 (16:16 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Sep 2020 22:44:53 +0000 (15:44 -0700)
commit0313ff5813da7a7e79d9c5a158e1b46ec4bf3890
tree7c964c64be01432c6d377580f5b3de30a8b05e42
parentc7717d0d1dd9b7ece2f72a0f2c0ccd5232f8e987
ipv6: Fix sysctl max for fib_multipath_hash_policy

Cited commit added the possible value of '2', but it cannot be set. Fix
it by adjusting the maximum value to '2'. This is consistent with the
corresponding IPv4 sysctl.

Before:

# sysctl -w net.ipv6.fib_multipath_hash_policy=2
sysctl: setting key "net.ipv6.fib_multipath_hash_policy": Invalid argument
net.ipv6.fib_multipath_hash_policy = 2
# sysctl net.ipv6.fib_multipath_hash_policy
net.ipv6.fib_multipath_hash_policy = 0

After:

# sysctl -w net.ipv6.fib_multipath_hash_policy=2
net.ipv6.fib_multipath_hash_policy = 2
# sysctl net.ipv6.fib_multipath_hash_policy
net.ipv6.fib_multipath_hash_policy = 2

Fixes: 2d6f93f51cbd ("ipv6: Support multipath hashing on inner IP pkts")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Stephen Suryaputra <ssuryaextr@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/sysctl_net_ipv6.c