From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Phil Sutter <phil@nwl.cc>,
netfilter-devel@vger.kernel.org, fw@strlen.de, igor@gooddata.com
Subject: Re: [PATCH iptables] nft-bridge: pass context structure to ops->add() to improve anonymous set support
Date: Thu, 13 Jul 2023 13:34:45 +0200 [thread overview]
Message-ID: <ZK/hVdvEcJobNz7W@calendula> (raw)
In-Reply-To: <ZK/a+LkEDbcAcZDZ@orbyte.nwl.cc>
On Thu, Jul 13, 2023 at 01:07:36PM +0200, Phil Sutter wrote:
> On Wed, Jul 12, 2023 at 07:13:50PM +0200, Pablo Neira Ayuso wrote:
> > On Wed, Jul 12, 2023 at 11:59:12AM +0200, Pablo Neira Ayuso wrote:
> > > diff --git a/iptables/nft.c b/iptables/nft.c
> > > index 1cb104e75ccc..59e3fa7079c4 100644
> > > --- a/iptables/nft.c
> > > +++ b/iptables/nft.c
> > [...]
> > > @@ -2878,6 +2888,9 @@ int nft_rule_zero_counters(struct nft_handle *h, const char *chain,
> > > {
> > > struct iptables_command_state cs = {};
> > > struct nftnl_rule *r, *new_rule;
> > > + struct nft_rule_ctx ctx = {
> > > + .command = NFT_COMPAT_RULE_ZERO,
> >
> > BTW. I changed this to:
> >
> > .command = NFT_COMPAT_RULE_APPEND,
> >
> > before pushing it out, for the record.
>
> Hmm. :)
>
> I'm curious how to trigger the problem. Could you please provide a
> test-case?
I suspect a problem might occur if the rule that is zeroed generates a
native expression.
nft_rule_zero_counters() calls _append() in practise, to readd the
rule after deleting it to zero the counters.
next prev parent reply other threads:[~2023-07-13 11:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 9:59 [PATCH iptables] nft-bridge: pass context structure to ops->add() to improve anonymous set support Pablo Neira Ayuso
2023-07-12 11:05 ` Igor Raits
2023-07-12 14:01 ` Pablo Neira Ayuso
2023-07-12 17:13 ` Pablo Neira Ayuso
2023-07-13 11:07 ` Phil Sutter
2023-07-13 11:34 ` Pablo Neira Ayuso [this message]
2023-07-13 11:50 ` Phil Sutter
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=ZK/hVdvEcJobNz7W@calendula \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--cc=igor@gooddata.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=phil@nwl.cc \
/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).