netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [nft PATCH 4/4] rule: Fix for single line ct timeout printing
Date: Thu, 17 Oct 2019 13:29:10 +0200	[thread overview]
Message-ID: <20191017112910.GK12661@orbyte.nwl.cc> (raw)
In-Reply-To: <20191017111437.6rhllpyuw3wbti56@salvia>

On Thu, Oct 17, 2019 at 01:14:37PM +0200, Pablo Neira Ayuso wrote:
> On Thu, Oct 17, 2019 at 01:03:22AM +0200, Phil Sutter wrote:
> > Commit 43ae7a48ae3de ("rule: do not print semicolon in ct timeout")
> > removed an extra semicolon at end of line, but thereby broke single line
> > output. The correct fix is to use opts->stmt_separator which holds
> > either newline or semicolon chars depending on output mode.
> 
> What output mode this breaks? It looks indeed like I overlook
> something while fixing up this.

It breaks syntax of monitor and echo output. We don't propagate it, but
the goal always has been for those to print syntactically correct
commands.

The concrete test case in tests/monitor/testcases/object.t is:

| add ct timeout ip t ctt { protocol udp; l3proto ip; policy = { unreplied : 15, replied : 12 }; }

Omitting the semicolon before 'l3proto' is illegal syntax.

Cheers, Phil

  reply	other threads:[~2019-10-17 11:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 23:03 [nft PATCH 0/4] A bunch of fixes for --echo option Phil Sutter
2019-10-16 23:03 ` [nft PATCH 1/4] monitor: Add missing newline to error message Phil Sutter
2019-10-17  8:00   ` Florian Westphal
2019-10-17 11:11   ` Pablo Neira Ayuso
2019-10-16 23:03 ` [nft PATCH 2/4] Revert "monitor: fix double cache update with --echo" Phil Sutter
2019-10-17  8:00   ` Florian Westphal
2019-10-17  8:55   ` Pablo Neira Ayuso
2019-10-17  9:07     ` Pablo Neira Ayuso
2019-10-17 10:36       ` Phil Sutter
2019-10-17 11:09         ` Pablo Neira Ayuso
2019-10-17 11:25           ` Phil Sutter
2019-10-17 11:29         ` Pablo Neira Ayuso
2019-10-17 11:37           ` Phil Sutter
2019-10-16 23:03 ` [nft PATCH 3/4] tests/monitor: Fix for changed ct timeout format Phil Sutter
2019-10-17  8:00   ` Florian Westphal
2019-10-17 11:12   ` Pablo Neira Ayuso
2019-10-16 23:03 ` [nft PATCH 4/4] rule: Fix for single line ct timeout printing Phil Sutter
2019-10-17  8:01   ` Florian Westphal
2019-10-17 11:14   ` Pablo Neira Ayuso
2019-10-17 11:29     ` Phil Sutter [this message]
2019-10-17 11:34       ` Pablo Neira Ayuso
2019-10-17 11:34   ` Pablo Neira Ayuso

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=20191017112910.GK12661@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --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 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).