netfilter: ipt_CLUSTERIP: only add arp mangle hook when required
authorFlorian Westphal <fw@strlen.de>
Thu, 22 Jul 2021 08:48:32 +0000 (10:48 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 1 Aug 2021 10:00:50 +0000 (12:00 +0200)
commit7c1829b6aa74fff71abc1c9565151e50ad1aa3e1
treee4af68ceb72ad51272ef414133792fe1b29fc84c
parent92fb15513edc6ae1eb51f717e70d4d3d538c2d09
netfilter: ipt_CLUSTERIP: only add arp mangle hook when required

Do not register the arp mangling hooks from pernet init path.

As-is, load of the module is enough for these hooks to become active
in each net namespace.

Use checkentry instead so hook is only added if a CLUSTERIP rule is used.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/ipt_CLUSTERIP.c