summaryrefslogtreecommitdiff
path: root/net/netfilter/nft_last.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2022-10-14 23:45:58 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2022-11-15 10:46:34 +0100
commit7d34aa3e03b6a56306296bd98b26c6a1710cd57b (patch)
treeb6433794bb2069d4cbec27b49b4a730d879ca373 /net/netfilter/nft_last.c
parent7394c2dd62dec8bdbe347d195c2dc1b332cc9ec5 (diff)
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_last.c')
-rw-r--r--net/netfilter/nft_last.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/netfilter/nft_last.c b/net/netfilter/nft_last.c
index bb15a55dad5c..7f2bda6641bd 100644
--- a/net/netfilter/nft_last.c
+++ b/net/netfilter/nft_last.c
@@ -65,7 +65,8 @@ static void nft_last_eval(const struct nft_expr *expr,
WRITE_ONCE(last->set, 1);
}
-static int nft_last_dump(struct sk_buff *skb, const struct nft_expr *expr)
+static int nft_last_dump(struct sk_buff *skb,
+ const struct nft_expr *expr, bool reset)
{
struct nft_last_priv *priv = nft_expr_priv(expr);
struct nft_last *last = priv->last;