path: root/iptables/nft-bridge.c
diff options
authorPhil Sutter <>2019-08-20 15:15:19 +0200
committerPhil Sutter <>2019-11-25 23:30:40 +0100
commitd4d319cb0afdce06fb5e3fad5fe1cff4232bdbd6 (patch)
treede2b9f6d91675fd18b2b5c0d8d821a1e7f5a62ca /iptables/nft-bridge.c
parent7a373f6683afb799c8387bdec1da6a07e9e55b33 (diff)
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 <>
Diffstat (limited to 'iptables/nft-bridge.c')
1 files changed, 3 insertions, 2 deletions
diff --git a/iptables/nft-bridge.c b/iptables/nft-bridge.c
index 2e4b309b..0fc21b3a 100644
--- a/iptables/nft-bridge.c
+++ b/iptables/nft-bridge.c
@@ -126,7 +126,8 @@ static int _add_action(struct nftnl_rule *r, struct iptables_command_state *cs)
return add_action(r, cs, false);
-static int nft_bridge_add(struct nftnl_rule *r, void *data)
+static int nft_bridge_add(struct nft_handle *h,
+ struct nftnl_rule *r, void *data)
struct iptables_command_state *cs = data;
struct ebt_match *iter;
@@ -182,7 +183,7 @@ static int nft_bridge_add(struct nftnl_rule *r, void *data)
for (iter = cs->match_list; iter; iter = iter->next) {
if (iter->ismatch) {
- if (add_match(r, iter->u.match->m))
+ if (add_match(h, r, iter->u.match->m))
} else {
if (add_target(r, iter->u.watcher->t))