summaryrefslogtreecommitdiffstats
path: root/include/net/netfilter/nf_tables.h
diff options
context:
space:
mode:
authorPatrick McHardy2015-04-11 11:46:40 +0200
committerPablo Neira Ayuso2015-04-13 20:12:31 +0200
commit151d799a61da1b6f6b7e5116fb776177917bbe9a (patch)
treec9080e0cc8e06e85c42cd5948b7bce4de9cf35b8 /include/net/netfilter/nf_tables.h
parentnetfilter: nf_tables: prepare for expressions associated to set elements (diff)
downloadkernel-qcow2-linux-151d799a61da1b6f6b7e5116fb776177917bbe9a.tar.gz
kernel-qcow2-linux-151d799a61da1b6f6b7e5116fb776177917bbe9a.tar.xz
kernel-qcow2-linux-151d799a61da1b6f6b7e5116fb776177917bbe9a.zip
netfilter: nf_tables: mark stateful expressions
Add a flag to mark stateful expressions. This is used for dynamic expression instanstiation to limit the usable expressions. Strictly speaking only the dynset expression can not be used in order to avoid recursion, but since dynamically instantiating non-stateful expressions will simply create an identical copy, which behaves no differently than the original, this limits to expressions where it actually makes sense to dynamically instantiate them. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/netfilter/nf_tables.h')
-rw-r--r--include/net/netfilter/nf_tables.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index d45a871b3da6..e6bcf55dcf20 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -583,6 +583,7 @@ static inline void nft_set_gc_batch_add(struct nft_set_gc_batch *gcb,
* @policy: netlink attribute policy
* @maxattr: highest netlink attribute number
* @family: address family for AF-specific types
+ * @flags: expression type flags
*/
struct nft_expr_type {
const struct nft_expr_ops *(*select_ops)(const struct nft_ctx *,
@@ -594,8 +595,11 @@ struct nft_expr_type {
const struct nla_policy *policy;
unsigned int maxattr;
u8 family;
+ u8 flags;
};
+#define NFT_EXPR_STATEFUL 0x1
+
/**
* struct nft_expr_ops - nf_tables expression operations
*