Now that we always retrieve the object list to build a cache before executing
the command, this results in fully listing of existing objects in the kernel.
This is confusing when adding a simple rule, so better not to call
netlink_dump_*() from listing functions.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
{
struct table *table;
- netlink_dump_table(nlt);
table = table_alloc();
table->handle.family =
nft_table_attr_get_u32(nlt, NFT_TABLE_ATTR_FAMILY);
struct netlink_ctx *ctx = arg;
struct set *set;
- netlink_dump_set(nls);
set = netlink_delinearize_set(ctx, nls);
if (set == NULL)
return -1;
int err;
nls = alloc_nft_set(h);
- netlink_dump_set(nls);
err = mnl_nft_set_get(nf_sock, nls);
if (err < 0) {
nft_set_free(nls);
int err;
nls = alloc_nft_set(h);
- netlink_dump_set(nls);
err = mnl_nft_setelem_get(nf_sock, nls);
if (err < 0) {