aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/nf_tables_core.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2015-03-25 14:08:49 +0000
committerPablo Neira Ayuso <pablo@netfilter.org>2015-03-26 11:09:35 +0100
commitea4bd995b0f2fc5677ff8085e92a5d2544b9937c (patch)
tree57779db0522e30391cc7da130ba49d36f57761f4 /net/netfilter/nf_tables_core.c
parentnetfilter: nf_tables: return set extensions from ->lookup() (diff)
downloadlinux-dev-ea4bd995b0f2fc5677ff8085e92a5d2544b9937c.tar.xz
linux-dev-ea4bd995b0f2fc5677ff8085e92a5d2544b9937c.zip
netfilter: nf_tables: add transaction helper functions
Add some helper functions for building the genmask as preparation for set transactions. Also add a little documentation how this stuff actually works. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_tables_core.c')
-rw-r--r--net/netfilter/nf_tables_core.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/netfilter/nf_tables_core.c b/net/netfilter/nf_tables_core.c
index 4429008fe99d..ef4dfcbaf149 100644
--- a/net/netfilter/nf_tables_core.c
+++ b/net/netfilter/nf_tables_core.c
@@ -121,11 +121,7 @@ nft_do_chain(struct nft_pktinfo *pkt, const struct nf_hook_ops *ops)
struct nft_jumpstack jumpstack[NFT_JUMP_STACK_SIZE];
struct nft_stats *stats;
int rulenum;
- /*
- * Cache cursor to avoid problems in case that the cursor is updated
- * while traversing the ruleset.
- */
- unsigned int gencursor = ACCESS_ONCE(net->nft.gencursor);
+ unsigned int gencursor = nft_genmask_cur(net);
do_chain:
rulenum = 0;