From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Eric Garver <eric@garver.life>,
netfilter-devel@vger.kernel.org, phil@nwl.cc
Subject: Re: [PATCH nft] src: add cookie support for rules
Date: Tue, 4 Aug 2020 21:09:03 +0200 [thread overview]
Message-ID: <20200804190903.GA8820@salvia> (raw)
In-Reply-To: <20200804173805.52fw6m3f5pb4zeh5@egarver>
On Tue, Aug 04, 2020 at 01:38:05PM -0400, Eric Garver wrote:
> On Tue, Aug 04, 2020 at 04:24:12PM +0200, Pablo Neira Ayuso wrote:
> > This patch allows users to specify a unsigned 64-bit cookie for rules.
> > The userspace application assigns the cookie number for tracking the rule.
> > The cookie needs to be non-zero. This cookie value is only relevant to
> > userspace since this resides in the user data area.
> >
> > Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
> > ---
> > Phil, you suggested a cookie to track rules, here it is. A few notes:
> >
> > - This patch is missing json support.
> > - No need for kernel update since the cookie is stored in the user data area.
>
> It's also missing the ability to delete a rule using the cookie. I guess
> this means userspace will have to fetch the ruleset and map a cookie to
> rule handle in order to perform the delete.
This cookie idea provides an alternative to skip the input and output
json string comparison, you have to combine it with --echo.
You will still need to use the handle to uniquely identify the rule by
processing the echo message (compare the cookie you set in the rule
that is sent to the kernel, instead of comparing strings).
The input and output json string comparison might be a problem in the
midterm. New netlink attributes and old kernels might result in
different input and output json string.
This is not aiming to provide a mechanism to delete rules by other
than the rule handle.
prev parent reply other threads:[~2020-08-04 19:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-04 14:24 [PATCH nft] src: add cookie support for rules Pablo Neira Ayuso
2020-08-04 17:38 ` Eric Garver
2020-08-04 19:09 ` Pablo Neira Ayuso [this message]
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=20200804190903.GA8820@salvia \
--to=pablo@netfilter.org \
--cc=eric@garver.life \
--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.