All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: Laura Garcia <nevola@gmail.com>,
	netfilter-devel <netfilter-devel@vger.kernel.org>
Subject: Re: What is 'dynamic' set flag supposed to mean?
Date: Thu, 19 Sep 2019 13:52:40 +0200	[thread overview]
Message-ID: <20190919115240.nhaabyxfefbwok6w@salvia> (raw)
In-Reply-To: <20190919100329.GP6961@breakpoint.cc>

On Thu, Sep 19, 2019 at 12:03:29PM +0200, Florian Westphal wrote:
> Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > > I can't remove the if () because that would make it possible to lookup
> > > for meter-type sets.
> > 
> > Why is this a problem?
> 
> I was worried about this exposing expr pointers in the nft registers but
> that won't happen (lookup expr doesn't care, only dynset will check for
> attached expression coming from set).

See reply at the bottom of this email regarding ignoring the attached
expression.

> I will send a patch to zap this check.
> However, that still is a problem because that means "dynamic" can't
> be used in kernels < 5.4 .

I think this qualifies as a fix, it will be a two-liner, we could
send it to -stable?

> > I think we can just check instead from nft_lookup if there is an
> > extension in this then, instead of checking for the NFT_SET_EVAL flag
> > to fix this. Hence, you can make lookups on dynamic sets, but not on
> > dynamic sets with extensions.
> 
> What do you mean?

I was thinking about the counter per set element case, this is
something we don't support and IIRC ipset does. After this fix, we can
probably make a patch to check if the NFT_SET_EXT_EXPR exists, so we
can add counter per element matching a lookup. We also need a way to
say that this set has an expression counter when definiting the set.
At some point we might need to support for stateful objects per set
element too so users can also dump-and-reset an specific element
counter.

  reply	other threads:[~2019-09-19 11:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-18 11:53 What is 'dynamic' set flag supposed to mean? Florian Westphal
2019-09-18 14:10 ` Laura Garcia
2019-09-18 14:42   ` Florian Westphal
2019-09-19  8:43     ` Pablo Neira Ayuso
2019-09-19  9:24       ` Florian Westphal
2019-09-19  9:40         ` Pablo Neira Ayuso
2019-09-19 10:03           ` Florian Westphal
2019-09-19 11:52             ` Pablo Neira Ayuso [this message]
2019-09-19 11:56             ` Florian Westphal
2019-09-19 13:28               ` Pablo Neira Ayuso
2019-09-19 14:01                 ` Florian Westphal
2019-09-19 14:22                   ` Pablo Neira Ayuso
2019-09-19 14:34                     ` Florian Westphal
2019-09-19 14:55                       ` 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=20190919115240.nhaabyxfefbwok6w@salvia \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=nevola@gmail.com \
    /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.