From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: ffmancera@riseup.net
Subject: [PATCH nft] expression: use expr_clone() from verdict_expr_clone()
Date: Mon, 10 Jun 2019 13:53:33 +0200 [thread overview]
Message-ID: <20190610115333.27294-1-pablo@netfilter.org> (raw)
Chains are now expressions, do not assume a constant value is used.
Fixes: f1e8a129ee42 ("src: Introduce chain_expr in jump and goto statements")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
src/expression.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/expression.c b/src/expression.c
index a41e2dafe9fc..ef694f2a194d 100644
--- a/src/expression.c
+++ b/src/expression.c
@@ -217,7 +217,7 @@ static void verdict_expr_clone(struct expr *new, const struct expr *expr)
{
new->verdict = expr->verdict;
if (expr->chain != NULL)
- mpz_init_set(new->chain->value, expr->chain->value);
+ new->chain = expr_clone(expr->chain);
}
static void verdict_expr_destroy(struct expr *expr)
--
2.11.0
reply other threads:[~2019-06-10 11:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20190610115333.27294-1-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=ffmancera@riseup.net \
--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).