aboutsummaryrefslogtreecommitdiff
path: root/include/net/netfilter
diff options
context:
space:
mode:
authorGravatar Pablo Neira Ayuso <pablo@netfilter.org> 2021-03-18 01:25:05 +0100
committerGravatar Pablo Neira Ayuso <pablo@netfilter.org> 2021-03-18 01:35:39 +0100
commit0ce7cf4127f14078ca598ba9700d813178a59409 (patch)
tree821e84b58236e8b028b70b010e99a0f43e008499 /include/net/netfilter
parentnetfilter: flowtable: refresh timeout after dst and writable checks (diff)
downloadlinux-0ce7cf4127f14078ca598ba9700d813178a59409.tar.gz
linux-0ce7cf4127f14078ca598ba9700d813178a59409.tar.bz2
linux-0ce7cf4127f14078ca598ba9700d813178a59409.zip
netfilter: nftables: update table flags from the commit phase
Do not update table flags from the preparation phase. Store the flags update into the transaction, then update the flags from the commit phase. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/netfilter')
-rw-r--r--include/net/netfilter/nf_tables.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index fdec57d862b7..67bc36f7f4fb 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -1498,13 +1498,16 @@ struct nft_trans_chain {
struct nft_trans_table {
bool update;
- bool enable;
+ u8 state;
+ u32 flags;
};
#define nft_trans_table_update(trans) \
(((struct nft_trans_table *)trans->data)->update)
-#define nft_trans_table_enable(trans) \
- (((struct nft_trans_table *)trans->data)->enable)
+#define nft_trans_table_state(trans) \
+ (((struct nft_trans_table *)trans->data)->state)
+#define nft_trans_table_flags(trans) \
+ (((struct nft_trans_table *)trans->data)->flags)
struct nft_trans_elem {
struct nft_set *set;