All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antony Antony <antony.antony@secunet.com>
To: Steffen Klassert <steffen.klassert@secunet.com>
Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>,
	<antony.antony@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>,
	Sabrina Dubroca <sd@queasysnail.net>
Subject: Re: [PATCH ipsec-next v9] xfrm: Add Direction to the SA in or out
Date: Thu, 11 Apr 2024 11:36:13 +0200	[thread overview]
Message-ID: <ZhevDSFg7WhB2Phn@moon.secunet.de> (raw)
In-Reply-To: <ZhenlYZLnYD3A7jD@gauss3.secunet.de>

On Thu, Apr 11, 2024 at 11:04:21 +0200, Steffen Klassert wrote:
> On Thu, Apr 11, 2024 at 11:01:32AM +0200, Nicolas Dichtel wrote:
> > 
> > 
> > Le 11/04/2024 à 09:14, Steffen Klassert a écrit :
> > > On Wed, Apr 10, 2024 at 08:32:20AM +0200, Nicolas Dichtel wrote:
> > >> Le 09/04/2024 à 19:56, Antony Antony a écrit :
> > >>> This patch introduces the 'dir' attribute, 'in' or 'out', to the
> > >>> xfrm_state, SA, enhancing usability by delineating the scope of values
> > >>> based on direction. An input SA will now exclusively encompass values
> > >>> pertinent to input, effectively segregating them from output-related
> > >>> values. This change aims to streamline the configuration process and
> > >>> improve the overall clarity of SA attributes.
> > >>>
> > >>> This feature sets the groundwork for future patches, including
> > >>> the upcoming IP-TFS patch.
> > >>>
> > >>> Signed-off-by: Antony Antony <antony.antony@secunet.com>
> > >>> ---
> > >>> v8->v9:
> > >>>  - add validation XFRM_STATE_ICMP not allowed on OUT SA.
> > >>>
> > >>> v7->v8:
> > >>>  - add extra validation check on replay window and seq
> > >>>  - XFRM_MSG_UPDSA old and new SA should match "dir"
> > >>>
> > >>> v6->v7:
> > >>>  - add replay-window check non-esn 0 and ESN 1.
> > >>>  - remove :XFRMA_SA_DIR only allowed with HW OFFLOAD
> > >> Why? I still think that having an 'input' SA used in the output path is wrong
> > >> and confusing.
> > > 
> > > I don't think this can happen. This patch does not change the
> > > state lookups, so we should match the correct state as it was
> > > before that patch.
> > This is the point. The user can set whatever direction in the SA, there is no
> > check. He can set the dir to 'output' even if the SA is used in input.
> 
> Ah, yes indeed. That should be fixed, thanks for clarification!

I have v10 with two simple packet path checks and error counters as
Sabrina suggested. I imagine this would avoid inconsitancy Nicolas trying to
avoid.



  reply	other threads:[~2024-04-11  9:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09 17:56 [PATCH ipsec-next v9] xfrm: Add Direction to the SA in or out Antony Antony
2024-04-10  6:32 ` Nicolas Dichtel
2024-04-10  7:26   ` Sabrina Dubroca
2024-04-10  7:35     ` Nicolas Dichtel
2024-04-10  8:17       ` Sabrina Dubroca
2024-04-10  8:37         ` Nicolas Dichtel
2024-04-10  8:57           ` Sabrina Dubroca
2024-04-10 13:52             ` [devel-ipsec] " Paul Wouters
2024-04-11  7:23               ` Steffen Klassert
2024-04-11  7:22           ` Steffen Klassert
2024-04-11  9:05             ` Nicolas Dichtel
2024-04-11  9:31               ` Steffen Klassert
2024-04-11  7:14   ` Steffen Klassert
2024-04-11  9:01     ` Nicolas Dichtel
2024-04-11  9:04       ` Steffen Klassert
2024-04-11  9:36         ` Antony Antony [this message]
2024-04-11  9:35     ` 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=ZhevDSFg7WhB2Phn@moon.secunet.de \
    --to=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=sd@queasysnail.net \
    --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 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.