diff options
author | Florian Westphal <fw@strlen.de> | 2015-07-14 15:51:07 (GMT) |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-07-15 16:18:05 (GMT) |
commit | e7c8899f3e6f2830136cf6e115c4a55ce7a3920a (patch) | |
tree | 69361fc86865dd5aae94836f3af466711cf67494 /include | |
parent | 98d1bd802cdbc8f56868fae51edec13e86b59515 (diff) | |
download | linux-e7c8899f3e6f2830136cf6e115c4a55ce7a3920a.tar.xz |
netfilter: move tee_active to core
This prepares for a TEE like expression in nftables.
We want to ensure only one duplicate is sent, so both will
use the same percpu variable to detect duplication.
The other use case is detection of recursive call to xtables, but since
we don't want dependency from nft to xtables core its put into core.c
instead of the x_tables core.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netfilter.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 9bbd110..e01da73 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h @@ -390,4 +390,15 @@ extern struct nfq_ct_hook __rcu *nfq_ct_hook; static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} #endif +/** + * nf_skb_duplicated - TEE target has sent a packet + * + * When a xtables target sends a packet, the OUTPUT and POSTROUTING + * hooks are traversed again, i.e. nft and xtables are invoked recursively. + * + * This is used by xtables TEE target to prevent the duplicated skb from + * being duplicated again. + */ +DECLARE_PER_CPU(bool, nf_skb_duplicated); + #endif /*__LINUX_NETFILTER_H*/ |