From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Phil Sutter <phil@nwl.cc>
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:14:37 +0200 [thread overview]
Message-ID: <20191017111437.6rhllpyuw3wbti56@salvia> (raw)
In-Reply-To: <20191016230322.24432-5-phil@nwl.cc>
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.
Thanks.
> Fixes: 43ae7a48ae3de ("rule: do not print semicolon in ct timeout")
> Signed-off-by: Phil Sutter <phil@nwl.cc>
> ---
> src/rule.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/rule.c b/src/rule.c
> index 2d35bae44c9e5..3c7c8d63f8cdf 100644
> --- a/src/rule.c
> +++ b/src/rule.c
> @@ -1869,7 +1869,7 @@ static void obj_print_data(const struct obj *obj,
> nft_print(octx, "%s", opts->nl);
> nft_print(octx, "%s%sprotocol ", opts->tab, opts->tab);
> print_proto_name_proto(obj->ct_timeout.l4proto, octx);
> - nft_print(octx, "%s", opts->nl);
> + nft_print(octx, "%s", opts->stmt_separator);
> nft_print(octx, "%s%sl3proto %s%s",
> opts->tab, opts->tab,
> family2str(obj->ct_timeout.l3proto),
> --
> 2.23.0
>
next prev parent reply other threads:[~2019-10-17 11:14 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 [this message]
2019-10-17 11:29 ` Phil Sutter
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=20191017111437.6rhllpyuw3wbti56@salvia \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=phil@nwl.cc \
/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).