netfilter: nft_masq: deduplicate eval call-backs
authorJeremy Sowden <jeremy@azazel.net>
Wed, 15 Mar 2023 21:48:02 +0000 (21:48 +0000)
committerFlorian Westphal <fw@strlen.de>
Wed, 22 Mar 2023 20:48:59 +0000 (21:48 +0100)
commitf6ca5d5ed7ecee1ff4721565fb5a276884d1e785
tree40636acbc768e8bd0c6d873c6db85f4992a67e1e
parent6f56ad1b92328997e1b1792047099df6f8d7acb5
netfilter: nft_masq: deduplicate eval call-backs

nft_masq has separate ipv4 and ipv6 call-backs which share much of their
code, and an inet one switch containing a switch that calls one of the
others based on the family of the packet.  Merge the ipv4 and ipv6 ones
into the inet one in order to get rid of the duplicate code.

Const-qualify the `priv` pointer since we don't need to write through it.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Florian Westphal <fw@strlen.de>
net/netfilter/nft_masq.c