From d545778d5933ab20c1d9d34a44ae93b2668c60d2 Mon Sep 17 00:00:00 2001 From: Elise Lennion Date: Thu, 26 Jan 2017 15:09:44 -0200 Subject: src: Allow reset single stateful object Currently the stateful objects can only be reseted in groups. With this patch reseting a single object is allowed: $ nft reset counter filter https-traffic table ip filter { counter https-traffic { packets 8774 bytes 542668 } } $ nft list counter filter https-traffic table ip filter { counter https-traffic { packets 0 bytes 0 } } Heavily based on work from Pablo Neira Ayuso . Signed-off-by: Elise Lennion Signed-off-by: Pablo Neira Ayuso --- include/netlink.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/netlink.h') diff --git a/include/netlink.h b/include/netlink.h index 450aba57..d3fb8c5d 100644 --- a/include/netlink.h +++ b/include/netlink.h @@ -172,7 +172,8 @@ extern int netlink_flush_setelems(struct netlink_ctx *ctx, const struct handle * extern int netlink_list_objs(struct netlink_ctx *ctx, const struct handle *h, const struct location *loc); extern int netlink_reset_objs(struct netlink_ctx *ctx, const struct handle *h, - const struct location *loc, uint32_t type); + const struct location *loc, uint32_t type, + bool dump); extern int netlink_add_obj(struct netlink_ctx *ctx, const struct handle *h, struct obj *obj, bool excl); extern int netlink_delete_obj(struct netlink_ctx *ctx, const struct handle *h, -- cgit v1.2.3