diff options
| author | Florian Westphal <fw@strlen.de> | 2018-12-13 10:01:32 -0500 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-12-17 17:33:23 -0500 |
| commit | 76b90019e03d866eab85cb57c2a6416ab94284dc (patch) | |
| tree | 6de6971a541b32ca5268474120d09570e16231db /include/net | |
| parent | fe2d0020994cd9d4f451e3024109319af287413b (diff) | |
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>
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/netfilter/nf_nat_l4proto.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/include/net/netfilter/nf_nat_l4proto.h b/include/net/netfilter/nf_nat_l4proto.h index ebf7cbf605cb..406f7effeb8e 100644 --- a/include/net/netfilter/nf_nat_l4proto.h +++ b/include/net/netfilter/nf_nat_l4proto.h | |||
| @@ -20,9 +20,6 @@ struct nf_nat_l4proto { | |||
| 20 | unsigned int iphdroff, unsigned int hdroff, | 20 | unsigned int iphdroff, unsigned int hdroff, |
| 21 | const struct nf_conntrack_tuple *tuple, | 21 | const struct nf_conntrack_tuple *tuple, |
| 22 | enum nf_nat_manip_type maniptype); | 22 | enum nf_nat_manip_type maniptype); |
| 23 | |||
| 24 | int (*nlattr_to_range)(struct nlattr *tb[], | ||
| 25 | struct nf_nat_range2 *range); | ||
| 26 | }; | 23 | }; |
| 27 | 24 | ||
| 28 | /* Protocol registration. */ | 25 | /* Protocol registration. */ |
| @@ -48,7 +45,4 @@ extern const struct nf_nat_l4proto nf_nat_l4proto_sctp; | |||
| 48 | extern const struct nf_nat_l4proto nf_nat_l4proto_udplite; | 45 | extern const struct nf_nat_l4proto nf_nat_l4proto_udplite; |
| 49 | #endif | 46 | #endif |
| 50 | 47 | ||
| 51 | int nf_nat_l4proto_nlattr_to_range(struct nlattr *tb[], | ||
| 52 | struct nf_nat_range2 *range); | ||
| 53 | |||
| 54 | #endif /*_NF_NAT_L4PROTO_H*/ | 48 | #endif /*_NF_NAT_L4PROTO_H*/ |
