summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2024-06-24 20:57:03 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2024-06-25 20:40:47 +0200
commit13f20bc9ec4f9f25935bf52337d3d1708787bd55 (patch)
tree706f23689853f91e427ad199997285ed4f3d15e7 /include/net
parentd4f6f3994e133ff49e89d7e108500f45224a79e1 (diff)
netfilter: nf_tables: store chain pointer in rule transaction
Currently the chain can be derived from trans->ctx.chain, but the ctx will go away soon. Thus add the chain pointer to nft_trans_rule structure itself. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/netfilter/nf_tables.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index 328fdc140551..86e6bd63a205 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -1640,6 +1640,7 @@ struct nft_trans_binding {
struct nft_trans_rule {
struct nft_trans nft_trans;
struct nft_rule *rule;
+ struct nft_chain *chain;
struct nft_flow_rule *flow;
u32 rule_id;
bool bound;
@@ -1655,6 +1656,8 @@ struct nft_trans_rule {
nft_trans_container_rule(trans)->rule_id
#define nft_trans_rule_bound(trans) \
nft_trans_container_rule(trans)->bound
+#define nft_trans_rule_chain(trans) \
+ nft_trans_container_rule(trans)->chain
struct nft_trans_set {
struct nft_trans_binding nft_trans_binding;