aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2015-03-25 09:07:49 -0400
committerPablo Neira Ayuso <pablo@netfilter.org>2015-03-25 12:18:34 -0400
commit3ac4c07a24007f0f45d2082b745508768a8e21cf (patch)
tree1c37bb8fbea34f181a1f1cf85ee355fa7486dff2 /net
parentbfd6e327e118d2fe443047829047862b49012457 (diff)
netfilter: nf_tables: add set extensions
Add simple set extension infrastructure for maintaining variable sized and optional per element data. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_tables_api.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 0b969b66cb77..972c47f6e823 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -2827,6 +2827,22 @@ void nf_tables_unbind_set(const struct nft_ctx *ctx, struct nft_set *set,
2827 nf_tables_set_destroy(ctx, set); 2827 nf_tables_set_destroy(ctx, set);
2828} 2828}
2829 2829
2830const struct nft_set_ext_type nft_set_ext_types[] = {
2831 [NFT_SET_EXT_KEY] = {
2832 .len = sizeof(struct nft_data),
2833 .align = __alignof__(struct nft_data),
2834 },
2835 [NFT_SET_EXT_DATA] = {
2836 .len = sizeof(struct nft_data),
2837 .align = __alignof__(struct nft_data),
2838 },
2839 [NFT_SET_EXT_FLAGS] = {
2840 .len = sizeof(u8),
2841 .align = __alignof__(u8),
2842 },
2843};
2844EXPORT_SYMBOL_GPL(nft_set_ext_types);
2845
2830/* 2846/*
2831 * Set elements 2847 * Set elements
2832 */ 2848 */