summaryrefslogtreecommitdiffstats
path: root/iptables/nft.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2022-03-01 23:19:59 +0100
committerPhil Sutter <phil@nwl.cc>2022-03-10 17:38:31 +0100
commit0c0cd4340ed88fdd2e80d2d5ffc5886c41f5dee0 (patch)
treef5c1305c0c4ed122b5bd7e31884c2c26abab3e90 /iptables/nft.c
parentb6196c7504d4d41827cea86c167926125cdbf1f3 (diff)
nft: Don't pass command state opaque to family ops callbacks
There are no family-specific versions of struct iptables_command_state anymore, so no need to hide it behind void pointer. Pass the type as-is and save a few casts. While at it, drop unused callbacks parse_bitwise and parse_cmp. Signed-off-by: Phil Sutter <phil@nwl.cc> Acked-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/nft.c')
-rw-r--r--iptables/nft.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/iptables/nft.c b/iptables/nft.c
index d011d7c8..6883662f 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -1648,7 +1648,7 @@ void add_compat(struct nftnl_rule *r, uint32_t proto, bool inv)
struct nftnl_rule *
nft_rule_new(struct nft_handle *h, const char *chain, const char *table,
- void *data)
+ struct iptables_command_state *cs)
{
struct nftnl_rule *r;
@@ -1660,7 +1660,7 @@ nft_rule_new(struct nft_handle *h, const char *chain, const char *table,
nftnl_rule_set_str(r, NFTNL_RULE_TABLE, table);
nftnl_rule_set_str(r, NFTNL_RULE_CHAIN, chain);
- if (h->ops->add(h, r, data) < 0)
+ if (h->ops->add(h, r, cs) < 0)
goto err;
return r;