netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Haller <thaller@redhat.com>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org,
	"Maciej Żenczykowski" <zenczykowski@gmail.com>
Subject: Re: [PATCH v2 nft] parser: tcpopt: fix tcp option parsing with NUM + length field
Date: Wed, 06 Dec 2023 14:22:00 +0100	[thread overview]
Message-ID: <1f932f8ddf653979454537b5be2739182ba3cab7.camel@redhat.com> (raw)
In-Reply-To: <20231206121653.GH8352@breakpoint.cc>

On Wed, 2023-12-06 at 13:16 +0100, Florian Westphal wrote:
> Thomas Haller <thaller@redhat.com> wrote:
> > > Instead, feed the json-nft file to nft, then do a normal list-
> > > ruleset,
> > > then compare that vs. normal .nft file.
> > 
> > The .nft and .json-nft files are all fed back into `nft --check -
> > f`. So
> > that is happening too.
> 
> Not really, this checks that the parser eats the input.
> 
> > It will also comparing the raw files (after sanitize+prettify),
> > which
> > is closer to the original thing that is supposed to be tested. That
> > is
> > why it's done.
> 
> "metainfo": {
> -        "json_schema_version": 1,
> +        "version": "VERSION",
> "release_name": "RELEASE_NAME",
> -        "version": "VERSION"
> +        "json_schema_version": 1
> }
> },
> 
> i.e. it fails validation because the on-record file has a different
> layout/ordering than what is expected.

Does this mean all tests on `master` have this problem?

> 
> But if you feed it into nft, nft list ruleset will generate the
> expected
> (non-json) output.

where do you encounter that? How to reproduce this?

Is this an old libjansson? Since 2.8 (2016), JSON_PRESERVE_ORDER is
implied. Maybe libnftables needs to set JSON_PRESERVE_ORDER flag at a
few places.

> 
> > What issues do you mean? I don't see any. Did you test/review the
> > two
> > patches?
> 
> The first one is applied.  The second one I applied locally.
> 
> But its still picky about the formatting.

That's a problem...


  reply	other threads:[~2023-12-06 13:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05 11:56 [PATCH v2 nft] parser: tcpopt: fix tcp option parsing with NUM + length field Florian Westphal
2023-12-05 12:07 ` Pablo Neira Ayuso
2023-12-05 12:20   ` Florian Westphal
2023-12-05 12:50     ` Pablo Neira Ayuso
2023-12-05 13:14       ` Florian Westphal
2023-12-05 14:10         ` Pablo Neira Ayuso
2023-12-06  7:58 ` Thomas Haller
2023-12-06 11:38   ` Florian Westphal
2023-12-06 11:50     ` Thomas Haller
2023-12-06 11:59       ` Florian Westphal
2023-12-06 12:04         ` Florian Westphal
2023-12-06 12:09           ` Thomas Haller
2023-12-06 12:16             ` Florian Westphal
2023-12-06 13:22               ` Thomas Haller [this message]
2023-12-06 13:24                 ` Florian Westphal
2023-12-06 14:56                   ` Thomas Haller
2023-12-06 14:19           ` Phil Sutter
2023-12-06 15:12             ` 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=1f932f8ddf653979454537b5be2739182ba3cab7.camel@redhat.com \
    --to=thaller@redhat.com \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=zenczykowski@gmail.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 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).