From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Phil Sutter <phil@nwl.cc>
Cc: netfilter-devel@vger.kernel.org, Florian Westphal <fw@strlen.de>,
Jan Engelhardt <jengelh@inai.de>
Subject: Re: [iptables RFC PATCH 8/8] nft: Support compat extensions in rule userdata
Date: Mon, 16 Sep 2024 00:13:07 +0200 [thread overview]
Message-ID: <Zudb80USN6GGG05T@calendula> (raw)
In-Reply-To: <20240731222703.22741-9-phil@nwl.cc>
Hi Phil,
I have no better idea to cope with this forward compatibility
requirements.
On Thu, Aug 01, 2024 at 12:27:03AM +0200, Phil Sutter wrote:
> Add a mechanism providing forward compatibility for the current and
> future versions of iptables-nft (and all other nft-variants) by
> annotating nftnl rules with the extensions they were created for.
>
> Upon nftnl rule parsing failure, warn about the situation and perform a
> second attempt loading the respective compat extensions instead of the
> native expressions which replace them.
OK, so this is last resort to interpret the rule.
> The foundational assumption is that libxtables extensions are stable
> and thus the VM code created on their behalf does not need to be.
OK, this requires xtables API becomes frozen forever.
> Since nftnl rule userdata attributes are restricted to 255 bytes, the
> implementation focusses on low memory consumption. Therefore, extensions
> which remain in the rule as compat expressions are not also added to
> userdata. In turn, extensions in userdata are annotated by start and end
> expression number they are replacing. Also, the actual payload is
> zipped using zlib.
Binary layout is better than storing text in the userdata area.
Is this zlib approach sufficient to cope with ebtables among
extension? Maybe that one is excluded because it is using the set
infrastructure since the beginning.
I guess you already checked for worst case to make sure compression
always allows to make things fit into 255 bytes?
Thanks.
next prev parent reply other threads:[~2024-09-15 22:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 22:26 [iptables PATCH 0/8] nft: Implement forward compat for future binaries Phil Sutter
2024-07-31 22:26 ` [iptables PATCH 1/8] ebtables: Zero freed pointers in ebt_cs_clean() Phil Sutter
2024-07-31 22:26 ` [iptables PATCH 2/8] ebtables: Introduce nft_bridge_init_cs() Phil Sutter
2024-07-31 22:26 ` [iptables PATCH 3/8] nft: Reduce overhead in nft_rule_find() Phil Sutter
2024-07-31 22:26 ` [iptables PATCH 4/8] nft: ruleparse: Drop 'iter' variable in nft_rule_to_iptables_command_state Phil Sutter
2024-07-31 22:27 ` [iptables PATCH 5/8] nft: ruleparse: Introduce nft_parse_rule_expr() Phil Sutter
2024-07-31 22:27 ` [iptables PATCH 6/8] nft: __add_{match,target}() can't fail Phil Sutter
2024-07-31 22:27 ` [iptables PATCH 7/8] nft: Introduce UDATA_TYPE_COMPAT_EXT Phil Sutter
2024-07-31 22:27 ` [iptables RFC PATCH 8/8] nft: Support compat extensions in rule userdata Phil Sutter
2024-08-07 17:56 ` Pablo Neira Ayuso
2024-08-08 13:05 ` Phil Sutter
2024-09-15 22:13 ` Pablo Neira Ayuso [this message]
2024-09-17 21:27 ` Phil Sutter
2024-08-14 7:52 ` [iptables PATCH 0/8] nft: Implement forward compat for future binaries Phil Sutter
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=Zudb80USN6GGG05T@calendula \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--cc=jengelh@inai.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.