diff options
author | Phil Sutter <phil@nwl.cc> | 2022-10-14 23:45:58 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-11-15 10:46:34 +0100 |
commit | 7d34aa3e03b6a56306296bd98b26c6a1710cd57b (patch) | |
tree | b6433794bb2069d4cbec27b49b4a730d879ca373 /net/netfilter/nft_ct.c | |
parent | netfilter: nft_inner: fix return value check in nft_inner_parse_l2l3() (diff) | |
download | linux-7d34aa3e03b6a56306296bd98b26c6a1710cd57b.tar.gz linux-7d34aa3e03b6a56306296bd98b26c6a1710cd57b.tar.bz2 linux-7d34aa3e03b6a56306296bd98b26c6a1710cd57b.zip |
netfilter: nf_tables: Extend nft_expr_ops::dump callback parameters
Add a 'reset' flag just like with nft_object_ops::dump. This will be
useful to reset "anonymous stateful objects", e.g. simple rule counters.
No functional change intended.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_ct.c')
-rw-r--r-- | net/netfilter/nft_ct.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c index a3f01f209a53..a0696d7ea10c 100644 --- a/net/netfilter/nft_ct.c +++ b/net/netfilter/nft_ct.c @@ -641,7 +641,8 @@ static void nft_ct_set_destroy(const struct nft_ctx *ctx, nf_ct_netns_put(ctx->net, ctx->family); } -static int nft_ct_get_dump(struct sk_buff *skb, const struct nft_expr *expr) +static int nft_ct_get_dump(struct sk_buff *skb, + const struct nft_expr *expr, bool reset) { const struct nft_ct *priv = nft_expr_priv(expr); @@ -703,7 +704,8 @@ static bool nft_ct_get_reduce(struct nft_regs_track *track, return nft_expr_reduce_bitwise(track, expr); } -static int nft_ct_set_dump(struct sk_buff *skb, const struct nft_expr *expr) +static int nft_ct_set_dump(struct sk_buff *skb, + const struct nft_expr *expr, bool reset) { const struct nft_ct *priv = nft_expr_priv(expr); |