]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nat: remove l4proto->nlattr_to_range
authorFlorian Westphal <fw@strlen.de>
Thu, 13 Dec 2018 15:01:32 +0000 (16:01 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 17 Dec 2018 22:33:23 +0000 (23:33 +0100)
commit29a80dbd4f5ab2400e2432999966b6283b646515
tree6de6971a541b32ca5268474120d09570e16231db
parent8b63c8aa7148f9e1e83389f2bb20b2df4879caad
netfilter: nat: remove l4proto->nlattr_to_range

all protocols did set this to nf_nat_l4proto_nlattr_to_range, so
just call it directly.

The important difference is that we'll now also call it for
protocols that we don't support (i.e., nf_nat_proto_unknown did
not provide .nlattr_to_range).

However, there should be no harm, even icmp provided this callback.
If we don't implement a specific l4nat for this, nothing would make
use of this information, so adding a big switch/case construct listing
all supported l4protocols seems a bit pointless.

This change leaves a single function pointer in the l4proto struct.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_nat_l4proto.h
net/ipv4/netfilter/nf_nat_proto_gre.c
net/ipv4/netfilter/nf_nat_proto_icmp.c
net/ipv6/netfilter/nf_nat_proto_icmpv6.c
net/netfilter/Makefile
net/netfilter/nf_nat_core.c
net/netfilter/nf_nat_proto_common.c [deleted file]
net/netfilter/nf_nat_proto_dccp.c
net/netfilter/nf_nat_proto_sctp.c
net/netfilter/nf_nat_proto_tcp.c
net/netfilter/nf_nat_proto_udp.c