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-shared.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'iptables/nft-shared.h') diff --git a/iptables/nft-shared.h b/iptables/nft-shared.h index 1cb2ea70..8c64d6e7 100644 --- a/iptables/nft-shared.h +++ b/iptables/nft-shared.h @@ -104,7 +104,7 @@ struct nft_family_ops { void (*rule_to_cs)(const struct nftnl_rule *r, struct iptables_command_state *cs); void (*clear_cs)(struct iptables_command_state *cs); - bool (*rule_find)(struct nft_family_ops *ops, struct nftnl_rule *r, + bool (*rule_find)(struct nft_handle *h, struct nftnl_rule *r, void *data); int (*xlate)(const void *data, struct xt_xlate *xl); }; @@ -165,7 +165,7 @@ void save_matches_and_target(const struct iptables_command_state *cs, struct nft_family_ops *nft_family_ops_lookup(int family); void nft_ipv46_parse_target(struct xtables_target *t, void *data); -bool nft_ipv46_rule_find(struct nft_family_ops *ops, struct nftnl_rule *r, +bool nft_ipv46_rule_find(struct nft_handle *h, struct nftnl_rule *r, void *data); bool compare_matches(struct xtables_rule_match *mt1, struct xtables_rule_match *mt2); -- cgit v1.2.3