diff options
author | Phil Sutter <phil@nwl.cc> | 2021-11-30 20:06:09 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2021-12-03 12:50:18 +0100 |
commit | cb4b07d0b62836ab860e11e1f50c98656eeb4f9f (patch) | |
tree | dd8a67b372a79d230991a137a03ec8a3fe3573d3 /src/netlink.c | |
parent | de961b93066007ffcde12e49d8cd9bafd7201732 (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.c | 3 |
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; |