netfilter: Update to register_net_sysctl_sz
authorJoel Granados <joel.granados@gmail.com>
Wed, 9 Aug 2023 10:50:02 +0000 (12:50 +0200)
committerLuis Chamberlain <mcgrof@kernel.org>
Tue, 15 Aug 2023 22:26:17 +0000 (15:26 -0700)
commit385a5dc9e578bdc43bf5196258f699f08612379b
treeae04c9765a08b0ba7c29ce815a92a416515aa806
parent7737e46d9d57b230381755b83104dab5a1e631ec
netfilter: Update to register_net_sysctl_sz

Move from register_net_sysctl to register_net_sysctl_sz for all the
netfilter related files. Do this while making sure to mirror the NULL
assignments with a table_size of zero for the unprivileged users.

We need to move to the new function in preparation for when we change
SIZE_MAX to ARRAY_SIZE() in the register_net_sysctl macro. Failing to do
so would erroneously allow ARRAY_SIZE() to be called on a pointer. We
hold off the SIZE_MAX to ARRAY_SIZE change until we have migrated all
the relevant net sysctl registering functions to register_net_sysctl_sz
in subsequent commits.

Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Joel Granados <j.granados@samsung.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
net/bridge/br_netfilter_hooks.c
net/ipv6/netfilter/nf_conntrack_reasm.c
net/netfilter/ipvs/ip_vs_ctl.c
net/netfilter/ipvs/ip_vs_lblc.c
net/netfilter/ipvs/ip_vs_lblcr.c
net/netfilter/nf_conntrack_standalone.c
net/netfilter/nf_log.c