All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Phil Sutter <phil@nwl.cc>, netfilter-devel@vger.kernel.org, fw@strlen.de
Subject: Re: [PATCH nft 2/5] tests: shell: cannot use handle for non-existing rule in kernel
Date: Mon, 17 Jun 2019 18:06:57 +0200	[thread overview]
Message-ID: <20190617160657.qrl2vx5dn5zomk6l@salvia> (raw)
In-Reply-To: <20190617160030.GS31548@orbyte.nwl.cc>

Hi Phil,

On Mon, Jun 17, 2019 at 06:00:30PM +0200, Phil Sutter wrote:
> Hi,
> 
> On Mon, Jun 17, 2019 at 02:25:15PM +0200, Pablo Neira Ayuso wrote:
> > This test invokes the 'replace rule ... handle 2' command. However,
> > there are no rules in the kernel, therefore it always fails.
> 
> This guesses the previously inserted rule's handle. Does this start
> failing with your flags conversion in place?

Yes.

> My initial implementation of intra-transaction rule references made
> this handle guessing impossible, but your single point cache
> fetching still allowed for it (hence why I dropped my patch with a
> similar change).

Hm. I think we should not guess the handle that the kernel assigns.

In a batch, handles do not exist. We could expose the
intra-transaction index if needed to the user. But I don't see a
use-case for this.

I think we should leave the handle as a reference to already existing
rules in the kernel.

  reply	other threads:[~2019-06-17 16:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17 12:25 [PATCH nft 1/5] src: remove useless parameter from cache_flush() Pablo Neira Ayuso
2019-06-17 12:25 ` [PATCH nft 2/5] tests: shell: cannot use handle for non-existing rule in kernel Pablo Neira Ayuso
2019-06-17 16:00   ` Phil Sutter
2019-06-17 16:06     ` Pablo Neira Ayuso [this message]
2019-06-17 16:29       ` Phil Sutter
2019-06-17 12:25 ` [PATCH nft 3/5] src: add cache level flags Pablo Neira Ayuso
2019-06-17 15:57   ` Phil Sutter
2019-06-17 16:11   ` Phil Sutter
2019-06-17 16:28     ` Pablo Neira Ayuso
2019-06-17 16:45       ` Phil Sutter
2019-06-17 17:24         ` Pablo Neira Ayuso
2019-06-17 17:28           ` Phil Sutter
2019-06-17 17:33             ` Pablo Neira Ayuso
2019-06-17 20:37               ` Phil Sutter
2019-06-17 12:25 ` [PATCH nft 4/5] rule: skip cache population from do_command_monitor() Pablo Neira Ayuso
2019-06-17 12:25 ` [PATCH nft 5/5] netlink: remove netlink_list_table() 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=20190617160657.qrl2vx5dn5zomk6l@salvia \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.de \
    --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 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.