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>
This commit is contained in:
committed by
Pablo Neira Ayuso
parent
d4f6f3994e
commit
13f20bc9ec
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user