netfilter: nat: remove nf_nat_l3proto.h and nf_nat_core.h
The l3proto name is gone, its header file is the last trace. While at it, also remove nf_nat_core.h, its very small and all users include nf_nat.h too. before: text data bss dec hex filename 22948 1612 4136 28696 7018 nf_nat.ko after removal of l3proto register/unregister functions: text data bss dec hex filename 22196 1516 4136 27848 6cc8 nf_nat.ko checkpatch complains about overly long lines, but line breaks do not make things more readable and the line length gets smaller here, not larger. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
committed by
Pablo Neira Ayuso
parent
d6c4c8ffb5
commit
d2c5c103b1
@@ -51,7 +51,6 @@
|
||||
#include <net/netfilter/nf_conntrack_labels.h>
|
||||
#include <net/netfilter/nf_conntrack_synproxy.h>
|
||||
#include <net/netfilter/nf_nat.h>
|
||||
#include <net/netfilter/nf_nat_core.h>
|
||||
#include <net/netfilter/nf_nat_helper.h>
|
||||
#include <net/netns/hash.h>
|
||||
#include <net/ip.h>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include <net/netfilter/nf_conntrack_labels.h>
|
||||
#include <net/netfilter/nf_conntrack_synproxy.h>
|
||||
#ifdef CONFIG_NF_NAT_NEEDED
|
||||
#include <net/netfilter/nf_nat_core.h>
|
||||
#include <net/netfilter/nf_nat.h>
|
||||
#include <net/netfilter/nf_nat_helper.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
#include <net/netfilter/nf_conntrack.h>
|
||||
#include <net/netfilter/nf_conntrack_core.h>
|
||||
#include <net/netfilter/nf_nat.h>
|
||||
#include <net/netfilter/nf_nat_l3proto.h>
|
||||
#include <net/netfilter/nf_nat_core.h>
|
||||
#include <net/netfilter/nf_nat_helper.h>
|
||||
#include <net/netfilter/nf_conntrack_helper.h>
|
||||
#include <net/netfilter/nf_conntrack_seqadj.h>
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
#include <net/netfilter/nf_conntrack_expect.h>
|
||||
#include <net/netfilter/nf_conntrack_seqadj.h>
|
||||
#include <net/netfilter/nf_nat.h>
|
||||
#include <net/netfilter/nf_nat_l3proto.h>
|
||||
#include <net/netfilter/nf_nat_core.h>
|
||||
#include <net/netfilter/nf_nat_helper.h>
|
||||
|
||||
/* Frobs data inside this packet, which is linear. */
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
|
||||
#include <linux/netfilter.h>
|
||||
#include <net/netfilter/nf_nat.h>
|
||||
#include <net/netfilter/nf_nat_core.h>
|
||||
#include <net/netfilter/nf_nat_l3proto.h>
|
||||
|
||||
#include <linux/ipv6.h>
|
||||
#include <linux/netfilter_ipv6.h>
|
||||
@@ -758,17 +756,17 @@ static const struct nf_hook_ops nf_nat_ipv4_ops[] = {
|
||||
},
|
||||
};
|
||||
|
||||
int nf_nat_l3proto_ipv4_register_fn(struct net *net, const struct nf_hook_ops *ops)
|
||||
int nf_nat_ipv4_register_fn(struct net *net, const struct nf_hook_ops *ops)
|
||||
{
|
||||
return nf_nat_register_fn(net, ops, nf_nat_ipv4_ops, ARRAY_SIZE(nf_nat_ipv4_ops));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nf_nat_l3proto_ipv4_register_fn);
|
||||
EXPORT_SYMBOL_GPL(nf_nat_ipv4_register_fn);
|
||||
|
||||
void nf_nat_l3proto_ipv4_unregister_fn(struct net *net, const struct nf_hook_ops *ops)
|
||||
void nf_nat_ipv4_unregister_fn(struct net *net, const struct nf_hook_ops *ops)
|
||||
{
|
||||
nf_nat_unregister_fn(net, ops, ARRAY_SIZE(nf_nat_ipv4_ops));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nf_nat_l3proto_ipv4_unregister_fn);
|
||||
EXPORT_SYMBOL_GPL(nf_nat_ipv4_unregister_fn);
|
||||
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
int nf_nat_icmpv6_reply_translation(struct sk_buff *skb,
|
||||
@@ -1010,16 +1008,16 @@ static const struct nf_hook_ops nf_nat_ipv6_ops[] = {
|
||||
},
|
||||
};
|
||||
|
||||
int nf_nat_l3proto_ipv6_register_fn(struct net *net, const struct nf_hook_ops *ops)
|
||||
int nf_nat_ipv6_register_fn(struct net *net, const struct nf_hook_ops *ops)
|
||||
{
|
||||
return nf_nat_register_fn(net, ops, nf_nat_ipv6_ops,
|
||||
ARRAY_SIZE(nf_nat_ipv6_ops));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nf_nat_l3proto_ipv6_register_fn);
|
||||
EXPORT_SYMBOL_GPL(nf_nat_ipv6_register_fn);
|
||||
|
||||
void nf_nat_l3proto_ipv6_unregister_fn(struct net *net, const struct nf_hook_ops *ops)
|
||||
void nf_nat_ipv6_unregister_fn(struct net *net, const struct nf_hook_ops *ops)
|
||||
{
|
||||
nf_nat_unregister_fn(net, ops, ARRAY_SIZE(nf_nat_ipv6_ops));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nf_nat_l3proto_ipv6_unregister_fn);
|
||||
EXPORT_SYMBOL_GPL(nf_nat_ipv6_unregister_fn);
|
||||
#endif /* CONFIG_IPV6 */
|
||||
|
||||
@@ -21,9 +21,7 @@
|
||||
#include <linux/netfilter/nf_tables.h>
|
||||
#include <net/netfilter/nf_conntrack.h>
|
||||
#include <net/netfilter/nf_nat.h>
|
||||
#include <net/netfilter/nf_nat_core.h>
|
||||
#include <net/netfilter/nf_tables.h>
|
||||
#include <net/netfilter/nf_nat_l3proto.h>
|
||||
#include <net/ip.h>
|
||||
|
||||
struct nft_nat {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/netfilter.h>
|
||||
#include <linux/netfilter/x_tables.h>
|
||||
#include <net/netfilter/nf_nat_core.h>
|
||||
#include <net/netfilter/nf_nat.h>
|
||||
|
||||
static int xt_nat_checkentry_v0(const struct xt_tgchk_param *par)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user