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:37:57 +0200 [thread overview]
Message-ID: <20191017113757.GL12661@orbyte.nwl.cc> (raw)
In-Reply-To: <20191017112917.6oartfhrj73y5sy5@salvia>
On Thu, Oct 17, 2019 at 01:29:17PM +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 }'
> >
> > > > > 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').
>
> After reverting:
>
> # ./run-tests.sh testcases/sets/0036add_set_element_expiration_0
> I: using nft binary ./../../src/nft
>
> W: [FAILED] testcases/sets/0036add_set_element_expiration_0: got 139
>
> I: results: [OK] 0 [FAILED] 1 [TOTAL] 1
>
> so I made the test for this fix.
>
> commit 44348edfb9fa414152d53bcf705db882899ddc4e
> Author: Pablo Neira Ayuso <pablo@netfilter.org>
> Date: Mon Jul 1 18:34:42 2019 +0200
>
> tests: shell: restore element expiration
>
> This patch adds a test for 24f33c710e8c ("src: enable set expiration
> date for set elements").
>
> This is also implicitly testing for a cache corruption bug that is fixed
> by 9b032cd6477b ("monitor: fix double cache update with --echo").
Ah, thanks for the pointer! I'll check what's going wrong there.
Cheers, Phil
next prev parent reply other threads:[~2019-10-17 11:37 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
2019-10-17 11:29 ` Pablo Neira Ayuso
2019-10-17 11:37 ` Phil Sutter [this message]
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=20191017113757.GL12661@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.