From: Stephen Hemminger <stephen@networkplumber.org>
To: Roi Dayan <roid@nvidia.com>
Cc: <netdev@vger.kernel.org>, Paul Blakey <paulb@nvidia.com>,
David Ahern <dsahern@kernel.org>
Subject: Re: [PATCH iproute2 1/2] tc: ct: Fix ct commit nat forcing addr
Date: Wed, 16 Nov 2022 10:21:02 -0800 [thread overview]
Message-ID: <20221116102102.72599e40@hermes.local> (raw)
In-Reply-To: <20221116073312.177786-2-roid@nvidia.com>
On Wed, 16 Nov 2022 09:33:11 +0200
Roi Dayan <roid@nvidia.com> wrote:
> Action ct commit should accept nat src/dst without an addr. Fix it.
>
> Fixes: c8a494314c40 ("tc: Introduce tc ct action")
> Signed-off-by: Roi Dayan <roid@nvidia.com>
> Reviewed-by: Paul Blakey <paulb@nvidia.com>
> ---
> man/man8/tc-ct.8 | 2 +-
> tc/m_ct.c | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/man/man8/tc-ct.8 b/man/man8/tc-ct.8
> index 2fb81ca29aa4..78d05e430c36 100644
> --- a/man/man8/tc-ct.8
> +++ b/man/man8/tc-ct.8
> @@ -47,7 +47,7 @@ Specify a masked 32bit mark to set for the connection (only valid with commit).
> Specify a masked 128bit label to set for the connection (only valid with commit).
> .TP
> .BI nat " NAT_SPEC"
> -.BI Where " NAT_SPEC " ":= {src|dst} addr" " addr1" "[-" "addr2" "] [port " "port1" "[-" "port2" "]]"
> +.BI Where " NAT_SPEC " ":= {src|dst} [addr" " addr1" "[-" "addr2" "] [port " "port1" "[-" "port2" "]]]"
>
> Specify src/dst and range of nat to configure for the connection (only valid with commit).
> .RS
> diff --git a/tc/m_ct.c b/tc/m_ct.c
> index a02bf0cc1655..1b8984075a67 100644
> --- a/tc/m_ct.c
> +++ b/tc/m_ct.c
> @@ -23,7 +23,7 @@ usage(void)
> " ct commit [force] [zone ZONE] [mark MASKED_MARK] [label MASKED_LABEL] [nat NAT_SPEC]\n"
> " ct [nat] [zone ZONE]\n"
> "Where: ZONE is the conntrack zone table number\n"
> - " NAT_SPEC is {src|dst} addr addr1[-addr2] [port port1[-port2]]\n"
> + " NAT_SPEC is {src|dst} [addr addr1[-addr2] [port port1[-port2]]]\n"
> "\n");
> exit(-1);
> }
> @@ -234,7 +234,7 @@ parse_ct(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
>
> NEXT_ARG();
> if (matches(*argv, "addr") != 0)
> - usage();
> + continue;
>
This confuses me. Doing continue here will cause the current argument to be reprocessed so
it would expect it to be zone | nat | clear | commit | force | index | mark | label
which is not right.
next prev parent reply other threads:[~2022-11-16 18:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 7:33 [PATCH iproute2 0/2] two fixes for tc ct command Roi Dayan
2022-11-16 7:33 ` [PATCH iproute2 1/2] tc: ct: Fix ct commit nat forcing addr Roi Dayan
2022-11-16 18:21 ` Stephen Hemminger [this message]
2022-11-17 5:35 ` Roi Dayan
2022-11-17 14:00 ` Roi Dayan
2022-11-24 8:21 ` Roi Dayan
2022-11-16 7:33 ` [PATCH iproute2 2/2] tc: ct: Fix invalid pointer derefence Roi Dayan
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=20221116102102.72599e40@hermes.local \
--to=stephen@networkplumber.org \
--cc=dsahern@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paulb@nvidia.com \
--cc=roid@nvidia.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 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.