Respect an optionally specified table name to filter listed flowtables
to by populating the filter accordingly.
Fixes: a1a6b0a5c3c4 ("cache: finer grain cache population for list commands")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: Pablo Neira Ayuso <pablo@netfilter.org>
Tested-by: Eric Garver <eric@garver.life>
/* 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:
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