netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: nftables monitor json mode is broken
Date: Thu, 28 Aug 2025 14:27:17 +0200	[thread overview]
Message-ID: <aLBLJW9qwTSjlLZW@calendula> (raw)
In-Reply-To: <aLAhaqBWKt5wyWZ6@strlen.de>

On Thu, Aug 28, 2025 at 11:29:14AM +0200, Florian Westphal wrote:
> Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > > Why? Is unfixable to consider this?
> 
> I'm not sure.
> 
> It depends on several factors:
> 1. Do we have users of the json monitor mode?
> 2. Can they cope with *partial* info?
>    For non-json, the user will be a human and they
>    can the delete messages will have enough info to
>    correlate it with the corresponding add messages.
>    But for automated robots consuming json? Dunno.
> 3. Is the burden of correlating the delete info
>    with the full information about the deleted object
>    on the nft monitor -j side or the consumer of the
>    (Then incomplete) json info?

I don't think json output should diverge from the native monitor mode,
which only displays the partial information.

Then, for stateful objects such as counters, maybe there is a usecase
to display this in the delete object events, but then native nftables
monitor should display the same behaviour.

> > this is a relatively large rework, I started some code but is
> > incomplete, including rule caching to deal with runtime incremental
> > updates.
> 
> Thanks Pablo.
> 
> > I think it should be better to fix what we have then look pick back on
> > the rework at some point.
> 
> I also prefer repair to "nuke it".
> But I dislike the idea of spending time on something that is not
> used in practice.

I don't find a good reason to cripple json to make it less capable
than the native representation.

  reply	other threads:[~2025-08-28 12:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-27 17:12 nftables monitor json mode is broken Florian Westphal
2025-08-27 18:19 ` Pablo Neira Ayuso
2025-08-27 18:37   ` Pablo Neira Ayuso
2025-08-28  9:29     ` Florian Westphal
2025-08-28 12:27       ` Pablo Neira Ayuso [this message]
2025-08-27 20:55 ` Phil Sutter
2025-08-27 21:10   ` Phil Sutter
2025-08-28  9:31     ` Florian Westphal

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=aLBLJW9qwTSjlLZW@calendula \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.de \
    --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).