summaryrefslogtreecommitdiffstats
path: root/src/netlink.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2021-11-30 20:06:09 +0100
committerPhil Sutter <phil@nwl.cc>2021-12-03 12:50:18 +0100
commitcb4b07d0b62836ab860e11e1f50c98656eeb4f9f (patch)
treedd8a67b372a79d230991a137a03ec8a3fe3573d3 /src/netlink.c
parentde961b93066007ffcde12e49d8cd9bafd7201732 (diff)
cache: Support filtering for a specific flowtable
Extend nft_cache_filter to hold a flowtable name so 'list flowtable' command causes fetching the requested flowtable only. Dump flowtables just once instead of for each table, merely assign fetched data to tables inside the loop. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'src/netlink.c')
-rw-r--r--src/netlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/netlink.c b/src/netlink.c
index f74c0383..359d801c 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -1721,7 +1721,8 @@ int netlink_list_flowtables(struct netlink_ctx *ctx, const struct handle *h)
struct nftnl_flowtable_list *flowtable_cache;
int err;
- flowtable_cache = mnl_nft_flowtable_dump(ctx, h->family, h->table.name);
+ flowtable_cache = mnl_nft_flowtable_dump(ctx, h->family,
+ h->table.name, NULL);
if (flowtable_cache == NULL) {
if (errno == EINTR)
return -1;