From: Florian Westphal <fw@strlen.de>
To: Zhongqiu Duan <dzq.aishenghu0@gmail.com>
Cc: coreteam@netfilter.org, netfilter-devel@vger.kernel.org,
Pablo Neira Ayuso <pablo@netfilter.org>,
Jozsef Kadlecsik <kadlec@netfilter.org>,
Simon Horman <horms@kernel.org>,
Fernando Fernandez Mancera <ffmancera@riseup.net>
Subject: Re: [PATCH nft 3/3] src: only print the mss and wscale of synproxy if they are present
Date: Fri, 4 Jul 2025 13:54:15 +0200 [thread overview]
Message-ID: <aGfA5_aH6QT5z_rf@strlen.de> (raw)
In-Reply-To: <20250704113947.676-4-dzq.aishenghu0@gmail.com>
Zhongqiu Duan <dzq.aishenghu0@gmail.com> wrote:
> The listing of the synproxy statement will print a zero value
> for unpresented fields.
>
> e.g., the rule add by `nft add rule inet t c synproxy wscale 8 sack-perm`
> will print as 'synproxy mss 0 wscale 8 sack-perm'.
>
> Signed-off-by: Zhongqiu Duan <dzq.aishenghu0@gmail.com>
> ---
> src/statement.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/statement.c b/src/statement.c
> index 695b57a6cc65..ced002f63115 100644
> --- a/src/statement.c
> +++ b/src/statement.c
> @@ -1058,7 +1058,7 @@ static void synproxy_stmt_print(const struct stmt *stmt,
> const char *ts_str = synproxy_timestamp_to_str(flags);
> const char *sack_str = synproxy_sack_to_str(flags);
>
> - if (flags & (NF_SYNPROXY_OPT_MSS | NF_SYNPROXY_OPT_WSCALE))
> + if ((flags & NF_SYNPROXY_OPT_MSS) && (flags & NF_SYNPROXY_OPT_WSCALE))
> nft_print(octx, "synproxy mss %u wscale %u%s%s",
> stmt->synproxy.mss, stmt->synproxy.wscale,
> ts_str, sack_str);
This looks wrong, this will now only print it if both are set.
next prev parent reply other threads:[~2025-07-04 11:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-04 11:39 [PATCH nft 0/3] make the mss and wscale fields optional for synproxy object Zhongqiu Duan
2025-07-04 11:39 ` [PATCH nft 1/3] src: " Zhongqiu Duan
2025-07-04 12:27 ` Florian Westphal
2025-07-04 14:46 ` Zhongqiu Duan
2025-07-04 11:39 ` [PATCH nft 2/3] src: do not print unnecessary space for the " Zhongqiu Duan
2025-07-04 14:56 ` Zhongqiu Duan
2025-07-04 11:39 ` [PATCH nft 3/3] src: only print the mss and wscale of synproxy if they are present Zhongqiu Duan
2025-07-04 11:54 ` Florian Westphal [this message]
2025-07-04 12:11 ` Zhongqiu Duan
2025-07-04 12:21 ` 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=aGfA5_aH6QT5z_rf@strlen.de \
--to=fw@strlen.de \
--cc=coreteam@netfilter.org \
--cc=dzq.aishenghu0@gmail.com \
--cc=ffmancera@riseup.net \
--cc=horms@kernel.org \
--cc=kadlec@netfilter.org \
--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.