From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Thomas Haller <thaller@redhat.com>,
NetFilter <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH nft v3 2/2] json: drop warning on stderr for missing json() hook in stmt_print_json()
Date: Fri, 3 Nov 2023 17:59:39 +0100 [thread overview]
Message-ID: <20231103165939.GG8035@breakpoint.cc> (raw)
In-Reply-To: <ZUUkA43oAM7XO7LU@calendula>
Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> On Fri, Nov 03, 2023 at 05:25:14PM +0100, Thomas Haller wrote:
> > diff --git a/src/statement.c b/src/statement.c
> > index f5176e6d87f9..d52b01b9099a 100644
> > --- a/src/statement.c
> > +++ b/src/statement.c
> > @@ -141,6 +141,7 @@ static const struct stmt_ops chain_stmt_ops = {
> > .type = STMT_CHAIN,
> > .name = "chain",
> > .print = chain_stmt_print,
> > + .json = NULL, /* BUG: must be implemented! */
>
> This is a bit starting the house from the roof.
>
> Better fix this first, so this ugly patch does not need to be applied.
Agreed, I would keep the fprintf and all the fallback print code.
We can remove this AFTER expternal means (unit test f.e.) ensure all the
stmt/expr_ops have the needed callbacks.
next prev parent reply other threads:[~2023-11-03 16:59 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
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 [this message]
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=20231103165939.GG8035@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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.