From d4d319cb0afdce06fb5e3fad5fe1cff4232bdbd6 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 20 Aug 2019 15:15:19 +0200 Subject: nft: family_ops: Pass nft_handle to 'add' callback In order for add_match() to create anonymous sets when converting xtables matches it needs access to nft handle. So pass it along from callers of family ops' add callback. Signed-off-by: Phil Sutter Acked-by: Pablo Neira Ayuso --- iptables/nft-ipv4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'iptables/nft-ipv4.c') diff --git a/iptables/nft-ipv4.c b/iptables/nft-ipv4.c index 4497eb9b..57d1b3c6 100644 --- a/iptables/nft-ipv4.c +++ b/iptables/nft-ipv4.c @@ -26,7 +26,7 @@ #include "nft.h" #include "nft-shared.h" -static int nft_ipv4_add(struct nftnl_rule *r, void *data) +static int nft_ipv4_add(struct nft_handle *h, struct nftnl_rule *r, void *data) { struct iptables_command_state *cs = data; struct xtables_rule_match *matchp; @@ -77,7 +77,7 @@ static int nft_ipv4_add(struct nftnl_rule *r, void *data) add_compat(r, cs->fw.ip.proto, cs->fw.ip.invflags & XT_INV_PROTO); for (matchp = cs->matches; matchp; matchp = matchp->next) { - ret = add_match(r, matchp->match->m); + ret = add_match(h, r, matchp->match->m); if (ret < 0) return ret; } -- cgit v1.2.3