From: Phil Sutter <phil@nwl.cc>
To: netfilter-devel@vger.kernel.org
Subject: Re: [iptables PATCH v2 0/4] Implement a best-effort forward compat solution
Date: Fri, 11 Aug 2023 15:58:57 +0200 [thread overview]
Message-ID: <ZNY+ocQhqescnjB7@orbyte.nwl.cc> (raw)
In-Reply-To: <20230810185452.24387-1-phil@nwl.cc>
On Thu, Aug 10, 2023 at 08:54:48PM +0200, Phil Sutter wrote:
> Initial attempts of keeping a compatible version of each rule in the
> kernel for being dumped so any old user space will be able to parse it
> despite what conversions to native expressions have taken place have
> failed: The dump-only bytecode may contain a lookup expression,
> therefore requires updating and an extra set and so on. This will be a
> nightmare to maintain in kernel. Any alternative to this is not
> transparent to old user space which can't be touched in a scenario of
> $RANDOM old container has to parse the host's ruleset.
>
> Instead of the above, follow a much simpler route by implementing a
> compat-mode into current *tables-nft which avoids any of the later
> internal changes which may prevent an old iptables-nft from parsing a
> kernel's rule correctly. An up to date host expecting outdated
> containers accessing its ruleset may create it in a compatible form,
> trading potential performance regressions in for compatibility.
>
> Patch 1 is just prep work, patch 2 adds the core logic, patch 3 exposes
> it to CLI and patch 4 finally adds some testing.
>
> This should resolve nfbz#1632[1], albeit requiring adjustments in how
> users call iptables.
>
> [1] https://bugzilla.netfilter.org/show_bug.cgi?id=1632
>
> Changes since v1:
> - Rebase to current HEAD
> - Add missing parser and man page adjustments in patch 3
>
> Phil Sutter (4):
> nft: Pass nft_handle to add_{target,action}()
> nft: Introduce and use bool nft_handle::compat
> Add --compat option to *tables-nft and *-nft-restore commands
> tests: Test compat mode
Series applied.
prev parent reply other threads:[~2023-08-11 13:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 18:54 [iptables PATCH v2 0/4] Implement a best-effort forward compat solution Phil Sutter
2023-08-10 18:54 ` [iptables PATCH v2 1/4] nft: Pass nft_handle to add_{target,action}() Phil Sutter
2023-08-10 18:54 ` [iptables PATCH v2 2/4] nft: Introduce and use bool nft_handle::compat Phil Sutter
2023-08-10 18:54 ` [iptables PATCH v2 3/4] Add --compat option to *tables-nft and *-nft-restore commands Phil Sutter
2023-08-10 18:54 ` [iptables PATCH v2 4/4] tests: Test compat mode Phil Sutter
2023-08-11 13:58 ` Phil Sutter [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=ZNY+ocQhqescnjB7@orbyte.nwl.cc \
--to=phil@nwl.cc \
--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).