summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2015-07-14 17:51:07 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2015-07-15 18:18:05 +0200
commite7c8899f3e6f2830136cf6e115c4a55ce7a3920a (patch)
tree69361fc86865dd5aae94836f3af466711cf67494 /include/linux
parent98d1bd802cdbc8f56868fae51edec13e86b59515 (diff)
downloadblackbird-op-linux-e7c8899f3e6f2830136cf6e115c4a55ce7a3920a.tar.gz
blackbird-op-linux-e7c8899f3e6f2830136cf6e115c4a55ce7a3920a.zip
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/linux')
-rw-r--r--include/linux/netfilter.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 9bbd110ec81b..e01da73ee6c4 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*/
OpenPOWER on IntegriCloud