From: Phil Sutter <phil@nwl.cc>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org, robert.smith51@protonmail.com
Subject: Re: [PATCH iptables] nft-ruleparse: parse meta mark set as MARK target
Date: Fri, 4 Aug 2023 18:21:58 +0200 [thread overview]
Message-ID: <ZM0lptBHzgTMV24n@orbyte.nwl.cc> (raw)
In-Reply-To: <20230803193917.26779-1-fw@strlen.de>
On Thu, Aug 03, 2023 at 09:39:13PM +0200, Florian Westphal wrote:
> Mixing nftables and iptables-nft in the same table doesn't work,
> but some people do this.
>
> v1.8.8 ignored rules it could not represent in iptables syntax,
> v1.8.9 bails in this case.
>
> Add parsing of meta mark expressions so iptables-nft can render them
> as -j MARK rules.
>
> This is flawed, nft has features that have no corresponding
> syntax in iptables, but we can't undo this.
>
> Link: https://bugzilla.netfilter.org/show_bug.cgi?id=1659
Intentionally not "Closes:"?
> Signed-off-by: Florian Westphal <fw@strlen.de>
> ---
> iptables/nft-ruleparse.c | 83 +++++++++++++++++++++++++++-------------
> 1 file changed, 56 insertions(+), 27 deletions(-)
>
> diff --git a/iptables/nft-ruleparse.c b/iptables/nft-ruleparse.c
> index edbbfa40e9c4..44b9bcc268f4 100644
> --- a/iptables/nft-ruleparse.c
> +++ b/iptables/nft-ruleparse.c
> @@ -84,6 +84,37 @@ nft_create_match(struct nft_xt_ctx *ctx,
> return match->m->data;
> }
>
> +static void *
> +nft_create_target(struct nft_xt_ctx *ctx,
> + struct iptables_command_state *cs,
> + const char *name)
Please hold back a bit, I have a better implementation of this function
lingering locally. Will adjust and submit both in a minute.
Thanks, Phil
next prev parent reply other threads:[~2023-08-04 16:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-03 19:39 [PATCH iptables] nft-ruleparse: parse meta mark set as MARK target Florian Westphal
2023-08-04 16:21 ` Phil Sutter [this message]
2023-08-04 16:22 ` Florian Westphal
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=ZM0lptBHzgTMV24n@orbyte.nwl.cc \
--to=phil@nwl.cc \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=robert.smith51@protonmail.com \
/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).