From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: [nft PATCH 2/4] Revert "monitor: fix double cache update with --echo"
Date: Thu, 17 Oct 2019 01:03:20 +0200 [thread overview]
Message-ID: <20191016230322.24432-3-phil@nwl.cc> (raw)
In-Reply-To: <20191016230322.24432-1-phil@nwl.cc>
This reverts commit 9b032cd6477b847f48dc8454f0e73935e9f48754.
While it is true that a cache exists, we still need to capture new sets
and their elements if they are anonymous. This is because the name
changes and rules will refer to them by name.
Given that there is no easy way to identify the anonymous set in cache
(kernel doesn't (and shouldn't) dump SET_ID value) to update its name,
just go with cache updates. Assuming that echo option is typically used
for single commands, there is not much cache updating happening anyway.
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
src/monitor.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/monitor.c b/src/monitor.c
index 20810a5de0cfb..f353c5b09cf5d 100644
--- a/src/monitor.c
+++ b/src/monitor.c
@@ -900,6 +900,7 @@ 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))
--
2.23.0
next prev parent reply other threads:[~2019-10-16 23:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 23:03 [nft PATCH 0/4] A bunch of fixes for --echo option Phil Sutter
2019-10-16 23:03 ` [nft PATCH 1/4] monitor: Add missing newline to error message Phil Sutter
2019-10-17 8:00 ` Florian Westphal
2019-10-17 11:11 ` Pablo Neira Ayuso
2019-10-16 23:03 ` Phil Sutter [this message]
2019-10-17 8:00 ` [nft PATCH 2/4] Revert "monitor: fix double cache update with --echo" Florian Westphal
2019-10-17 8:55 ` Pablo Neira Ayuso
2019-10-17 9:07 ` Pablo Neira Ayuso
2019-10-17 10:36 ` Phil Sutter
2019-10-17 11:09 ` Pablo Neira Ayuso
2019-10-17 11:25 ` Phil Sutter
2019-10-17 11:29 ` Pablo Neira Ayuso
2019-10-17 11:37 ` Phil Sutter
2019-10-16 23:03 ` [nft PATCH 3/4] tests/monitor: Fix for changed ct timeout format Phil Sutter
2019-10-17 8:00 ` Florian Westphal
2019-10-17 11:12 ` Pablo Neira Ayuso
2019-10-16 23:03 ` [nft PATCH 4/4] rule: Fix for single line ct timeout printing Phil Sutter
2019-10-17 8:01 ` Florian Westphal
2019-10-17 11:14 ` Pablo Neira Ayuso
2019-10-17 11:29 ` Phil Sutter
2019-10-17 11:34 ` Pablo Neira Ayuso
2019-10-17 11:34 ` Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191016230322.24432-3-phil@nwl.cc \
--to=phil@nwl.cc \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).