From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH nftables 4/4] optimize: do not merge raw payload expressions
Date: Wed, 26 Jan 2022 23:33:14 +0100 [thread overview]
Message-ID: <20220126223314.297735-5-pablo@netfilter.org> (raw)
In-Reply-To: <20220126223314.297735-1-pablo@netfilter.org>
Merging raw expressions results in a valid concatenation which throws:
Error: can not use variable sized data types (integer) in concat expressions
Disable merging raw expressions until this is supported by skipping raw
expressions.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
src/optimize.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/optimize.c b/src/optimize.c
index 5882f3bd005d..04523edb795b 100644
--- a/src/optimize.c
+++ b/src/optimize.c
@@ -40,6 +40,9 @@ static bool __expr_cmp(const struct expr *expr_a, const struct expr *expr_b)
switch (expr_a->etype) {
case EXPR_PAYLOAD:
+ /* disable until concatenation with integer works. */
+ if (expr_a->payload.is_raw || expr_b->payload.is_raw)
+ return false;
if (expr_a->payload.base != expr_b->payload.base)
return false;
if (expr_a->payload.offset != expr_b->payload.offset)
--
2.30.2
prev parent reply other threads:[~2022-01-26 22:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-26 22:33 [PATCH nftables 0/4] optimization updates Pablo Neira Ayuso
2022-01-26 22:33 ` [PATCH nftables 1/4] optimize: add __expr_cmp() Pablo Neira Ayuso
2022-01-26 22:33 ` [PATCH nftables 2/4] optimize: merge verdict maps with same lookup key Pablo Neira Ayuso
2022-01-26 22:33 ` [PATCH nftables 3/4] optimize: check for payload base and offset when searching for mergers Pablo Neira Ayuso
2022-01-26 22:33 ` Pablo Neira Ayuso [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=20220126223314.297735-5-pablo@netfilter.org \
--to=pablo@netfilter.org \
--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 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.