[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240415181248.GB6832@unreal>
Date: Mon, 15 Apr 2024 21:12:48 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Sabrina Dubroca <sd@...asysnail.net>
Cc: Antony Antony <antony@...nome.org>, antony.antony@...unet.com,
Steffen Klassert <steffen.klassert@...unet.com>,
Herbert Xu <herbert@...dor.apana.org.au>, netdev@...r.kernel.org,
"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, Eyal Birger <eyal.birger@...il.com>,
Nicolas Dichtel <nicolas.dichtel@...nd.com>
Subject: Re: [devel-ipsec] [PATCH ipsec-next v8] xfrm: Add Direction to the
SA in or out
On Mon, Apr 15, 2024 at 11:36:15AM +0200, Sabrina Dubroca wrote:
> 2024-04-14, 13:45:00 +0300, Leon Romanovsky wrote:
> > On Thu, Apr 11, 2024 at 10:00:07PM +0200, Sabrina Dubroca wrote:
> > > 2024-04-11, 14:55:57 +0300, Leon Romanovsky wrote:
> > > > On Thu, Apr 11, 2024 at 01:07:52PM +0200, Antony Antony via Devel wrote:
> > > > > On Thu, Apr 11, 2024 at 01:37:40PM +0300, Leon Romanovsky via Devel wrote:
> > > > > > On Tue, Apr 09, 2024 at 07:37:20PM +0200, Antony Antony via Devel wrote:
> > > > > > > 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.
> > > > > > >
> > > > > > > v7->v8:
> > > > > > > - add extra validation check on replay window and seq
> > > > > > > - XFRM_MSG_UPDSA old and new SA should match "dir"
> > > > > >
> > > > > > Why? Update is add and delete operation, and one can update any field
> > > > > > he/she wants, including direction.
> > > > >
> > > > > Update operations are not strictly necessary without IKEv2. However, during
> > > > > IKEv2 negotiation, updating "in" SA becomes essential.
> > > >
> > > > The thing is if you want to limit update routine to fit IKEv2 only, or
> > > > continue to allow users to do whatever they want with netlink and their
> > > > own applications without *swan.
> > > >
> > > > I don't have knowledge about such users, just remember seeking tons of
> > > > guides how to setup IPsec tunnel with iproute2 and scripts, one of them
> > > > can be potentially broken by this change.
> > >
> > > Nothing is going to break with this change. Old scripts and old
> > > userspace software are not providing XFRMA_SA_DIR, so none of the new
> > > checks apply.
> >
> > Right, but what about new iproute2, which eventually will users get
> > after system update and old scripts?
>
> I suspect that new iproute2 will add an option to set the direction
> (otherwise it'd have to guess a value, that's not the goal of xfrm
> support in iproute), and only pass XFRMA_SA_DIR when the user gave
> that extra argument, so nothing will change there either?
Correct, thanks for the clarification.
>
> --
> Sabrina
>
Powered by blists - more mailing lists