From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [nft PATCH 2/4] Revert "monitor: fix double cache update with --echo"
Date: Thu, 17 Oct 2019 13:25:03 +0200 [thread overview]
Message-ID: <20191017112503.GJ12661@orbyte.nwl.cc> (raw)
In-Reply-To: <20191017110957.xsgsrubsyzuhbfym@salvia>
Hi,
On Thu, Oct 17, 2019 at 01:09:57PM +0200, Pablo Neira Ayuso wrote:
> On Thu, Oct 17, 2019 at 12:36:49PM +0200, Phil Sutter wrote:
> > Hi Pablo,
> >
> > On Thu, Oct 17, 2019 at 11:07:38AM +0200, Pablo Neira Ayuso wrote:
> > > On Thu, Oct 17, 2019 at 10:55:49AM +0200, Pablo Neira Ayuso wrote:
> > > > On Thu, Oct 17, 2019 at 01:03:20AM +0200, Phil Sutter wrote:
> > > > > 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.
> > >
> > > Please, tell me how I can reproduce this here with a simple snippet
> > > and I will have a look. Thanks!
> >
> > Just run tests/monitor testsuite, echo testing simple.t will fail.
> > Alternatively, add a rule with anonymous set like so:
> > | # nft --echo add rule inet t c tcp dport '{ 22, 80 }'
>
> let me have a look.
Thanks!
> > > > > 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.
> > > >
> > > > This was fixing a real bug, if this is breaking anything, then I think
> > > > we are not getting to the root cause.
> > > >
> > > > But reverting it does not make things any better.
> >
> > With all respect, this wasn't obvious. There is no test case covering
> > it, commit message reads like it is an optimization (apart from the
> > subject containing 'fix').
>
> This patch is fixing --echo with nft using a batch via -f. I started
> updating the test infrastructure but I never finished this.
Ah, I guess extending tests/monitor is not feasible for that. Maybe just
add a case to tests/shell/testcases/nft-f? There is one shell
test for echo option already (cache/0007_echo_cache_init_0).
Cheers, Phil
next prev parent reply other threads:[~2019-10-17 11:25 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 ` [nft PATCH 2/4] Revert "monitor: fix double cache update with --echo" Phil Sutter
2019-10-17 8:00 ` 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 [this message]
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=20191017112503.GJ12661@orbyte.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).