From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, Florian Westphal <fw@strlen.de>
Subject: Re: [nft PATCH 0/7] A bunch of JSON printer/parser fixes
Date: Wed, 24 Apr 2024 22:41:53 +0200 [thread overview]
Message-ID: <ZilukXKP3frjjHMF@orbyte.nwl.cc> (raw)
In-Reply-To: <ZilmoE1LAAMErFbU@calendula>
On Wed, Apr 24, 2024 at 10:08:00PM +0200, Pablo Neira Ayuso wrote:
> On Wed, Apr 24, 2024 at 10:06:14PM +0200, Pablo Neira Ayuso wrote:
> > Hi Phil,
> >
> > On Sat, Mar 09, 2024 at 12:35:20PM +0100, Phil Sutter wrote:
> > > Fix the following flaws in JSON input/output code:
> > >
> > > * Patch 3:
> > > Wrong ordering of 'nft -j list ruleset' preventing a following restore
> > > of the dump. Code assumed dumping objects before chains was fine in
> > > all cases, when actually verdict maps may reference chains already.
> > > Dump like nft_cmd_expand() does when expanding nested syntax for
> > > kernel submission (chains first, objects second, finally rules).
> > >
> > > * Patch 5:
> > > Maps may contain concatenated "targets". Both printer and parser were
> > > entirely ignorant of that fact.
> > >
> > > * Patch 6:
> > > Synproxy objects were "mostly" supported, some hooks missing to
> > > cover for named ones.
> > >
> > > Patch 4 applies the new ordering to all stored json-nft dumps. Patch 7
> > > adds new dumps which are now parseable given the fixes above.
> > >
> > > Patches 1 and 2 are fallout fixes to initially make the whole shell
> > > testsuite pass on my testing system.
> > >
> > > Bugs still present after this series:
> > >
> > > * Nested chains remain entirely unsupported
> > > * Maps specifying interval "targets" (i.e., set->data->flags contains
> > > EXPR_F_INTERVAL bit) will be printed like regular ones and the parser
> > > then rejects them.
> >
> > I am seeing memleaks when running tests after this series, please see
> > attachment for reference.
>
> It could actually be related to:
>
> 0ac39384fd9e json: Accept more than two operands in binary expressions
>
> I did not bisect yet.
Good catch! I missed the fact that json_array_extend() does not decref
the emptied array. The fix is simple, will submit after the testsuite
has passed.
Thanks, Phil
prev parent reply other threads:[~2024-04-24 20:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-09 11:35 [nft PATCH 0/7] A bunch of JSON printer/parser fixes Phil Sutter
2024-03-09 11:35 ` [nft PATCH 1/7] tests: shell: maps/named_ct_objects: Fix for recent kernel Phil Sutter
2024-03-09 11:39 ` Florian Westphal
2024-03-09 11:44 ` Phil Sutter
2024-03-09 11:35 ` [nft PATCH 2/7] tests: shell: packetpath/flowtables: Avoid spurious EPERM Phil Sutter
2024-03-09 11:35 ` [nft PATCH 3/7] json: Order output like nft_cmd_expand() Phil Sutter
2024-03-09 11:35 ` [nft PATCH 4/7] tests: shell: Regenerate all json-nft dumps Phil Sutter
2024-03-09 11:35 ` [nft PATCH 5/7] json: Support maps with concatenated data Phil Sutter
2024-03-09 11:35 ` [nft PATCH 6/7] parser: json: Support for synproxy objects Phil Sutter
2024-03-09 11:35 ` [nft PATCH 7/7] tests: shell: Add missing json-nft dumps Phil Sutter
2024-03-19 17:26 ` [nft PATCH 0/7] A bunch of JSON printer/parser fixes Phil Sutter
2024-04-24 20:06 ` Pablo Neira Ayuso
2024-04-24 20:08 ` Pablo Neira Ayuso
2024-04-24 20:41 ` Phil Sutter [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=ZilukXKP3frjjHMF@orbyte.nwl.cc \
--to=phil@nwl.cc \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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.