lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 16 Nov 2022 10:21:02 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Roi Dayan <roid@...dia.com>
Cc:     <netdev@...r.kernel.org>, Paul Blakey <paulb@...dia.com>,
        David Ahern <dsahern@...nel.org>
Subject: Re: [PATCH iproute2 1/2] tc: ct: Fix ct commit nat forcing addr

On Wed, 16 Nov 2022 09:33:11 +0200
Roi Dayan <roid@...dia.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@...dia.com>
> Reviewed-by: Paul Blakey <paulb@...dia.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.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ