summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2024-08-26 00:41:40 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2024-08-26 18:38:07 +0200
commitebd06f85a3257c294572005d0fa6b8ab0f213486 (patch)
tree4f3234011641b1d757567e5beb75cf43a8c1abb6
parent969ce17b66f8084626610202f11d607911e049e6 (diff)
cache: only dump rules for the given table
Only family is set on in the dump request, set on table and chain otherwise, rules for the given family are fetched for each existing table. Fixes: afbd102211dc ("src: do not use the nft_cache_filter object from mnl.c") Tested-by: Eric Garver <eric@garver.life> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cache.c b/src/cache.c
index 3849a464..c36b3ebc 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -694,7 +694,7 @@ int rule_cache_dump(struct netlink_ctx *ctx, const struct handle *h,
bool dump, bool reset)
{
struct nftnl_rule_list *rule_cache;
- const char *table = NULL;
+ const char *table = h->table.name;
const char *chain = NULL;
uint64_t rule_handle = 0;