From 01d9357f684e4af8142b77f52529e2e6a5ce159b Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 20 Aug 2019 18:20:53 +0200 Subject: nft: family_ops: Pass nft_handle to 'rule_find' callback In order to prepare for rules containing set references, nft handle has to be passed to nft_rule_to_iptables_command_state() in order to let it access the set in cache. Signed-off-by: Phil Sutter Acked-by: Pablo Neira Ayuso --- iptables/nft-bridge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'iptables/nft-bridge.c') diff --git a/iptables/nft-bridge.c b/iptables/nft-bridge.c index 0fc21b3a..73bca2f3 100644 --- a/iptables/nft-bridge.c +++ b/iptables/nft-bridge.c @@ -537,7 +537,7 @@ static bool nft_bridge_is_same(const void *data_a, const void *data_b) return strcmp(a->in, b->in) == 0 && strcmp(a->out, b->out) == 0; } -static bool nft_bridge_rule_find(struct nft_family_ops *ops, struct nftnl_rule *r, +static bool nft_bridge_rule_find(struct nft_handle *h, struct nftnl_rule *r, void *data) { struct iptables_command_state *cs = data; @@ -568,7 +568,7 @@ static bool nft_bridge_rule_find(struct nft_family_ops *ops, struct nftnl_rule * ret = true; out: - ops->clear_cs(&this); + h->ops->clear_cs(&this); return ret; } -- cgit v1.2.3