diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-08-12 19:07:39 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-08-18 01:36:12 +0200 |
commit | e715f6d1241cfe03f7257dcafc8c90940a336e50 (patch) | |
tree | 6b865deeb1f49ce44572d99c3175ce9555b7438f /src/netlink.c | |
parent | 576bc0f8e51feac9af06dc206d69a695e4d35c91 (diff) |
netlink: don't call netlink_dump_*() from listing functions with --debug=netlink
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>
Diffstat (limited to 'src/netlink.c')
-rw-r--r-- | src/netlink.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/netlink.c b/src/netlink.c index 801696c8..a9050093 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -920,7 +920,6 @@ static struct table *netlink_delinearize_table(struct netlink_ctx *ctx, { struct table *table; - netlink_dump_table(nlt); table = table_alloc(); table->handle.family = nft_table_attr_get_u32(nlt, NFT_TABLE_ATTR_FAMILY); @@ -1233,7 +1232,6 @@ static int list_set_cb(struct nft_set *nls, void *arg) struct netlink_ctx *ctx = arg; struct set *set; - netlink_dump_set(nls); set = netlink_delinearize_set(ctx, nls); if (set == NULL) return -1; @@ -1270,7 +1268,6 @@ int netlink_get_set(struct netlink_ctx *ctx, const struct handle *h, 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); @@ -1511,7 +1508,6 @@ int netlink_get_setelems(struct netlink_ctx *ctx, const struct handle *h, int err; nls = alloc_nft_set(h); - netlink_dump_set(nls); err = mnl_nft_setelem_get(nf_sock, nls); if (err < 0) { |