netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sabrina Dubroca <sd@queasysnail.net>
To: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: antony.antony@secunet.com,
	Steffen Klassert <steffen.klassert@secunet.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	devel@linux-ipsec.org, Leon Romanovsky <leon@kernel.org>,
	Eyal Birger <eyal.birger@gmail.com>
Subject: Re: [PATCH ipsec-next v12 3/4] xfrm: Add dir validation to "in" data path lookup
Date: Wed, 24 Apr 2024 10:40:56 +0200	[thread overview]
Message-ID: <ZijFmMDST_ksUUnk@hog> (raw)
In-Reply-To: <8ac397dc-5498-493c-bcbc-926555ab60ab@6wind.com>

2024-04-23, 17:27:37 +0200, Nicolas Dichtel wrote:
> 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@secunet.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'.

Agree.

> This statistic is under 'Inbound errors', so may something like this is enough:
> 'State direction is output.'

Maybe something like:

State direction mismatch (lookup found an output state on the input path, expected input or no direction)

It's a bit verbose, but I think those extra details would help users
understand what went wrong.

-- 
Sabrina


  reply	other threads:[~2024-04-24  8:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23 12:48 [PATCH ipsec-next v12 0/4] xfrm: Introduce direction attribute for SA Antony Antony
2024-04-23 12:49 ` [PATCH ipsec-next v12 1/4] xfrm: Add Direction to the SA in or out Antony Antony
2024-04-24  9:38   ` Sabrina Dubroca
2024-04-26  7:47     ` Antony Antony
2024-04-23 12:49 ` [PATCH ipsec-next v12 2/4] xfrm: Add dir validation to "out" data path lookup Antony Antony
2024-04-23 12:50 ` [PATCH ipsec-next v12 3/4] xfrm: Add dir validation to "in" " Antony Antony
2024-04-23 15:27   ` Nicolas Dichtel
2024-04-24  8:40     ` Sabrina Dubroca [this message]
2024-04-24 10:04       ` Nicolas Dichtel
2024-04-26  8:11         ` Antony Antony
2024-04-23 12:51 ` [PATCH ipsec-next v12 4/4] xfrm: Restrict SA direction attribute to specific netlink message types Antony Antony
2024-04-26  4:49   ` Steffen Klassert
2024-04-26  7:50     ` Antony Antony

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=ZijFmMDST_ksUUnk@hog \
    --to=sd@queasysnail.net \
    --cc=antony.antony@secunet.com \
    --cc=davem@davemloft.net \
    --cc=devel@linux-ipsec.org \
    --cc=edumazet@google.com \
    --cc=eyal.birger@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=pabeni@redhat.com \
    --cc=steffen.klassert@secunet.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 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).