From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf-next] netfilter: nf_tables: export rule-set generation ID
Date: Tue, 9 Sep 2014 19:20:16 +0100 [thread overview]
Message-ID: <20140909182014.GA25039@acer.localdomain> (raw)
In-Reply-To: <1410282105-12880-1-git-send-email-pablo@netfilter.org>
On Tue, Sep 09, 2014 at 07:01:45PM +0200, Pablo Neira Ayuso wrote:
> This patch adds the NFT_MSG_GENID command to nf_tables that exposes
> the 16-bits ruleset generation ID. This ID is incremented in every
> commit. The generation ID is also exposed to userspace through the
> nfnetlink res_id header field when dumping object lists.
>
> This generation ID allows a userspace client to detect that an update
> has happened between two consecutive object list dumps, so it can
> retry from scratch.
>
> This is complementary to the NLM_F_DUMP_INTR approach, which allows
> us to detect an interference in the middle one single list dumping.
> There is no way to explicitly check that an interference has occurred
> between two list dumps from the kernel, since it doesn't know how
> many lists the userspace client is actually going to dump.
Well, the obvious question is, are we sure that 16 bit is enough?
I mean, sure, it most likely is for almost any usecase, but if you
want to write a reliable piece of software using it, can you be
sure and how could you handle the case that it overflows?
If we for instance consider an optimization algorithm that wants to
perform an update and has to dump all objects, perform its change,
reoptimize the resulting ruleset and then insert it. This might take
some considerable amount of time. I guess its at least possible that
2^16 updates could be performed in the same period.
next prev parent reply other threads:[~2014-09-09 18:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-09 17:01 [PATCH nf-next] netfilter: nf_tables: export rule-set generation ID Pablo Neira Ayuso
2014-09-09 18:20 ` Patrick McHardy [this message]
2014-09-10 14:40 ` Pablo Neira Ayuso
2014-09-10 15:23 ` Patrick McHardy
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=20140909182014.GA25039@acer.localdomain \
--to=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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).