From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Patrick McHardy <kaber@trash.net>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: nft cache updates
Date: Mon, 9 Nov 2015 17:48:47 +0100 [thread overview]
Message-ID: <20151109164847.GA1723@salvia> (raw)
In-Reply-To: <20151109153055.GI8098@macbook.localdomain>
On Mon, Nov 09, 2015 at 03:30:56PM +0000, Patrick McHardy wrote:
> Hi Pablo,
>
> I'm wondering what the rational for the current cache update behaviour is.
> The changelog states it is somehow related to the requested command, but
> that doesn't seem to be true.
>
> Even "nft describe" fails with EPERM as user since the cache appears to be
> initialized unconditionally, which is a bit unfortunate. Also I used to
> test things parsing, evaluation and even netlink generation without actually
> adding those rules as user, which does not work anymore. This might
> be harder to get working again, but I'm not sure why we do a full
> initialization anyways. The only thing that appears to be needed
> are sets, and those only in some specific circumstances.
To look up for the existing sets we need the existing tables and
chains, they are essential part of the object hierarchy. So this is
what we're currently dumping.
In general, we need this for incremental updates, in scenarios where
we have objects that are defined in kernelspace but userspace refers
to them.
As you said we can disable the cache in many cases, depending on the
command or if the ruleset file starts by:
flush ruleset
but I have left this out as follow up work, I just wanted to make sure
incremental updates where working, as well as the existing changes.
nft describe should be easy to restore.
Regarding inconditional check for table and chain, we have to make it
from the evaluation step in sets, so leaving other objects without
checking this seems inconsistent to me.
Another side effect of this is better error reporting to the user.
next prev parent reply other threads:[~2015-11-09 16:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-09 15:30 nft cache updates Patrick McHardy
2015-11-09 16:48 ` Pablo Neira Ayuso [this message]
2015-11-09 17:05 ` Patrick McHardy
2015-11-09 18:38 ` 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=20151109164847.GA1723@salvia \
--to=pablo@netfilter.org \
--cc=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.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 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).