]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: Use math to point per net sysctls into the appropriate struct net
authorCambda Zhu <cambda@linux.alibaba.com>
Tue, 3 Mar 2020 06:54:34 +0000 (14:54 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Mar 2020 22:50:08 +0000 (14:50 -0800)
commit5f8334515f6c4194d82b70e906f83916e56f758e
treeb751491f4d95f7bd9da609664fa6f720bb10a01f
parent4b45f420784fc2eb75323a8dc52ae238bd14d307
ipv6: Use math to point per net sysctls into the appropriate struct net

The data pointers of ipv6 sysctl are set one by one which is hard to
maintain, especially with kconfig. This patch simplifies it by using
math to point the per net sysctls into the appropriate struct net,
just like what we did for ipv4.

Signed-off-by: Cambda Zhu <cambda@linux.alibaba.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/sysctl_net_ipv6.c