[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8ac397dc-5498-493c-bcbc-926555ab60ab@6wind.com>
Date: Tue, 23 Apr 2024 17:27:37 +0200
From: Nicolas Dichtel <nicolas.dichtel@...nd.com>
To: antony.antony@...unet.com, Steffen Klassert
<steffen.klassert@...unet.com>, Herbert Xu <herbert@...dor.apana.org.au>,
netdev@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, devel@...ux-ipsec.org,
Leon Romanovsky <leon@...nel.org>, Eyal Birger <eyal.birger@...il.com>,
Sabrina Dubroca <sd@...asysnail.net>
Subject: Re: [PATCH ipsec-next v12 3/4] xfrm: Add dir validation to "in" data
path lookup
Le 23/04/2024 à 14:50, Antony Antony a écrit :
> Introduces validation for the x->dir attribute within the XFRM input
> data lookup path. If the configured direction does not match the
> expected direction, input, increment the XfrmInStateDirError counter
> and drop the packet to ensure data integrity and correct flow handling.
>
> grep -vw 0 /proc/net/xfrm_stat
> XfrmInStateDirError 1
>
> Signed-off-by: Antony Antony <antony.antony@...unet.com>
> ---
> v11 -> 12
> - add documentation to xfrm_proc.rst
>
> v10->v11
> - rename error s/XfrmInDirError/XfrmInStateDirError/
> ---
> Documentation/networking/xfrm_proc.rst | 3 +++
> include/uapi/linux/snmp.h | 1 +
> net/ipv6/xfrm6_input.c | 7 +++++++
> net/xfrm/xfrm_input.c | 11 +++++++++++
> net/xfrm/xfrm_proc.c | 1 +
> 5 files changed, 23 insertions(+)
>
> diff --git a/Documentation/networking/xfrm_proc.rst b/Documentation/networking/xfrm_proc.rst
> index c237bef03fb6..b4f4d9552dea 100644
> --- a/Documentation/networking/xfrm_proc.rst
> +++ b/Documentation/networking/xfrm_proc.rst
> @@ -73,6 +73,9 @@ XfrmAcquireError:
> XfrmFwdHdrError:
> Forward routing of a packet is not allowed
>
> +XfrmInStateDirError:
> + State direction input mismatched with lookup path direction
It's a bit confusing because when this error occurs, the state direction is not
'input'.
This statistic is under 'Inbound errors', so may something like this is enough:
'State direction is output.'
Regards,
Nicolas
Powered by blists - more mailing lists