]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
cache: only dump rules for the given table
authorPablo Neira Ayuso <pablo@netfilter.org>
Sun, 25 Aug 2024 22:41:40 +0000 (00:41 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 26 Aug 2024 16:38:07 +0000 (18:38 +0200)
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>
src/cache.c

index 3849a46404163d10d11c6297488d00d4c707c3ad..c36b3ebc0614af603a6aed1c5b4816e1bff966c7 100644 (file)
@@ -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;