xtables: move icmp/icmpv6 logic to xt_tcpudp
authorFlorian Westphal <fw@strlen.de>
Thu, 16 Mar 2023 14:44:08 +0000 (15:44 +0100)
committerFlorian Westphal <fw@strlen.de>
Wed, 22 Mar 2023 20:48:59 +0000 (21:48 +0100)
commit36ce9982ef2fb63fdf39996900866965d71f5a5e
tree4c3ea50f81ebb82e85ddcf019c876201b404a680
parentbde7170a04d69ab8013d0582e60e414d46d46dd6
xtables: move icmp/icmpv6 logic to xt_tcpudp

icmp/icmp6 matches are baked into ip(6)_tables.ko.

This means that even if iptables-nft is used, a rule like
"-p icmp --icmp-type 1" will load the ip(6)tables modules.

Move them to xt_tcpdudp.ko instead to avoid this.

This will also allow to eventually add kconfig knobs to build kernels
that support iptables-nft but not iptables-legacy (old set/getsockopt
interface).

Signed-off-by: Florian Westphal <fw@strlen.de>
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c
net/netfilter/xt_tcpudp.c