From: Florian Westphal <fw@strlen.de>
To: Thomas Haller <thaller@redhat.com>
Cc: NetFilter <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH nft v3 1/2] json: drop handling missing json() hook in expr_print_json()
Date: Fri, 3 Nov 2023 17:57:40 +0100 [thread overview]
Message-ID: <20231103165740.GF8035@breakpoint.cc> (raw)
In-Reply-To: <20231103162937.3352069-2-thaller@redhat.com>
Thomas Haller <thaller@redhat.com> wrote:
> --- a/src/expression.c
> +++ b/src/expression.c
> @@ -321,6 +321,7 @@ static const struct expr_ops symbol_expr_ops = {
> .type = EXPR_SYMBOL,
> .name = "symbol",
> .print = symbol_expr_print,
> + .json = NULL, /* expr_print_json() must never be called. */
I'd suggest to add a json callback that BUG()s instead,
with a comment explaining that these do not exist anymore
after the initial eval stage. (symbols will be resolved
to numeric value for example).
next prev parent reply other threads:[~2023-11-03 16:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 16:25 [PATCH nft v3 0/2] drop warning messages from stmt_print_json()/expr_print_json() Thomas Haller
2023-11-03 16:25 ` [PATCH nft v3 1/2] json: drop handling missing json() hook in expr_print_json() Thomas Haller
2023-11-03 16:57 ` Florian Westphal [this message]
2023-11-03 21:37 ` Phil Sutter
2023-11-04 5:28 ` Thomas Haller
2023-11-05 10:40 ` Phil Sutter
2023-11-05 16:56 ` Pablo Neira Ayuso
2023-11-03 16:25 ` [PATCH nft v3 2/2] json: drop warning on stderr for missing json() hook in stmt_print_json() Thomas Haller
2023-11-03 16:46 ` Pablo Neira Ayuso
2023-11-03 16:59 ` Florian Westphal
2023-11-03 18:20 ` Thomas Haller
2023-11-03 17:03 ` Thomas Haller
2023-11-03 21:47 ` Phil Sutter
2023-11-04 6:21 ` Thomas Haller
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=20231103165740.GF8035@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=thaller@redhat.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 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.