]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
monitor: fix double cache update with --echo
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 1 Jul 2019 16:10:30 +0000 (18:10 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 1 Jul 2019 16:10:59 +0000 (18:10 +0200)
The evaluation step already updates the cache for each command in this
batch. There is no need to update the cache again from the echo path,
otherwise the cache is populated twice with the same object.

Fixes: b99c4d072d99 ("Implement --echo option")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/monitor.c

index a68d960bfd4e8535a84d6d0d595037c616e8a9b8..5b25c9d4854e7a3b29334cf955ff180f5cd4a4bb 100644 (file)
@@ -900,7 +900,6 @@ int netlink_echo_callback(const struct nlmsghdr *nlh, void *data)
                .ctx = ctx,
                .loc = &netlink_location,
                .monitor_flags = 0xffffffff,
-               .cache_needed = true,
        };
 
        if (!nft_output_echo(&echo_monh.ctx->nft->output))