Respect an optionally specified table name to filter listed flowtables to by populating the filter accordingly. Signed-off-by: Phil Sutter --- src/cache.c | 1 + tests/shell/testcases/listing/cache_filters | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/cache.c b/src/cache.c index f86d000690929..bad8275326c76 100644 --- a/src/cache.c +++ b/src/cache.c @@ -266,6 +266,7 @@ static unsigned int evaluate_cache_list(struct nft_ctx *nft, struct cmd *cmd, /* fall through */ case CMD_OBJ_FLOWTABLES: filter->list.family = cmd->handle.family; + filter->list.table = cmd->handle.table.name; flags |= NFT_CACHE_TABLE | NFT_CACHE_FLOWTABLE; break; case CMD_OBJ_COUNTER: diff --git a/tests/shell/testcases/listing/cache_filters b/tests/shell/testcases/listing/cache_filters index 7a89330d2b6c0..e3d0e5e5a7217 100755 --- a/tests/shell/testcases/listing/cache_filters +++ b/tests/shell/testcases/listing/cache_filters @@ -47,4 +47,7 @@ $NFT --debug=netlink list flowtables | \ grep -q 'flow table ip_t ip_t_ft' || fail "broken list flowtables" $NFT --debug=netlink list flowtables ip6 | \ grep -q 'flow table ip_t ip_t_ft' && fail "broken list flowtables family filter" +$NFT --debug=netlink list flowtables ip ip_t2 | \ + grep -q 'flow table ip_t ip_t_ft' && fail "broken list flowtables table filter" + exit 0 -- 2.51.0