public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Sabrina Dubroca <sd@queasysnail•net>
To: Antony Antony <antony.antony@secunet•com>
Cc: Steffen Klassert <steffen.klassert@secunet•com>,
	Herbert Xu <herbert@gondor•apana.org.au>,
	"David S. Miller" <davem@davemloft•net>,
	Eric Dumazet <edumazet@google•com>,
	Jakub Kicinski <kuba@kernel•org>, Paolo Abeni <pabeni@redhat•com>,
	Simon Horman <horms@kernel•org>, David Ahern <dsahern@kernel•org>,
	Masahide NAKAMURA <nakam@linux-ipv6•org>,
	Paul Moore <paul@paul-moore•com>,
	Stephen Smalley <stephen.smalley.work@gmail•com>,
	Ondrej Mosnacek <omosnace@redhat•com>,
	Jonathan Corbet <corbet@lwn•net>,
	Shuah Khan <skhan@linuxfoundation•org>,
	netdev@vger•kernel.org, linux-kernel@vger•kernel.org,
	selinux@vger•kernel.org, linux-doc@vger•kernel.org,
	Chiachang Wang <chiachangwang@google•com>,
	Yan Yan <evitayan@google•com>,
	devel@linux-ipsec•org
Subject: Re: [PATCH ipsec-next v8 03/14] xfrm: allow migration from UDP encapsulated to non-encapsulated ESP
Date: Thu, 7 May 2026 11:26:49 +0200	[thread overview]
Message-ID: <afxa2RNjJGNeD7zf@krikkit> (raw)
In-Reply-To: <migrate-state-v8-3-4578fb016965@secunet.com>

2026-05-05, 06:32:30 +0200, Antony Antony wrote:
> The current code prevents migrating an SA from UDP encapsulation to
> plain ESP. This is needed when moving from a NATed path to a non-NATed
> one, for example when switching from IPv4+NAT to IPv6.
> 
> Only copy the existing encapsulation during migration if the encap
> attribute is explicitly provided.
> 
> Note: PF_KEY's SADB_X_MIGRATE always passes encap=NULL and never
> supported encapsulation in migration. PF_KEY is deprecated and was
> in feature freeze when UDP encapsulation was added to xfrm.
> 
> Signed-off-by: Antony Antony <antony.antony@secunet•com>
> Tested-by: Yan Yan <evitayan@google•com>
> ---
>  net/xfrm/xfrm_state.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)

Reviewed-by: Sabrina Dubroca <sd@queasysnail•net>

If someone complains about this we can add a sysctl
"preserve_old_encap_on_migrate".

-- 
Sabrina

  reply	other threads:[~2026-05-07  9:26 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05  4:31 [PATCH ipsec-next v8 00/14] xfrm: XFRM_MSG_MIGRATE_STATE new netlink message Antony Antony
2026-05-05  4:31 ` [PATCH ipsec-next v8 01/14] xfrm: remove redundant assignments Antony Antony
2026-05-07 10:37   ` Sabrina Dubroca
2026-05-05  4:32 ` [PATCH ipsec-next v8 02/14] xfrm: add extack to xfrm_init_state Antony Antony
2026-05-07 10:37   ` Sabrina Dubroca
2026-05-05  4:32 ` [PATCH ipsec-next v8 03/14] xfrm: allow migration from UDP encapsulated to non-encapsulated ESP Antony Antony
2026-05-07  9:26   ` Sabrina Dubroca [this message]
2026-05-05  4:32 ` [PATCH ipsec-next v8 04/14] xfrm: fix NAT-related field inheritance in SA migration Antony Antony
2026-05-07  9:33   ` Sabrina Dubroca
2026-05-07  9:56     ` Steffen Klassert
2026-05-07 10:13       ` Sabrina Dubroca
2026-05-05  4:32 ` [PATCH ipsec-next v8 05/14] xfrm: rename reqid in xfrm_migrate Antony Antony
2026-05-05  4:33 ` [PATCH ipsec-next v8 06/14] xfrm: split xfrm_state_migrate into create and install functions Antony Antony
2026-05-07 10:11   ` Sabrina Dubroca
2026-05-05  4:33 ` [PATCH ipsec-next v8 07/14] xfrm: check family before comparing addresses in migrate Antony Antony
2026-05-07 10:35   ` Sabrina Dubroca
2026-05-05  4:33 ` [PATCH ipsec-next v8 08/14] xfrm: add state synchronization after migration Antony Antony
2026-05-05  4:33 ` [PATCH ipsec-next v8 09/14] xfrm: add error messages to state migration Antony Antony
2026-05-07 12:56   ` Sabrina Dubroca
2026-05-05  4:34 ` [PATCH ipsec-next v8 10/14] xfrm: move encap and xuo into struct xfrm_migrate Antony Antony
2026-05-07 13:26   ` Sabrina Dubroca
2026-05-05  4:34 ` [PATCH ipsec-next v8 11/14] xfrm: refactor XFRMA_MTIMER_THRESH validation into a helper Antony Antony
2026-05-05  4:34 ` [PATCH ipsec-next v8 12/14] xfrm: add XFRM_MSG_MIGRATE_STATE for single SA migration Antony Antony
2026-05-07  9:12   ` Steffen Klassert
2026-05-11  9:13   ` Sabrina Dubroca
2026-05-26 19:01     ` [devel-ipsec] " Antony Antony
2026-05-05  4:34 ` [PATCH ipsec-next v8 13/14] xfrm: restrict netlink attributes for XFRM_MSG_MIGRATE_STATE Antony Antony
2026-05-05  4:34 ` [PATCH ipsec-next v8 14/14] xfrm: add documentation " Antony Antony
2026-05-11 12:57   ` Sabrina Dubroca
2026-05-26 19:02     ` [devel-ipsec] " 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=afxa2RNjJGNeD7zf@krikkit \
    --to=sd@queasysnail$(echo .)net \
    --cc=antony.antony@secunet$(echo .)com \
    --cc=chiachangwang@google$(echo .)com \
    --cc=corbet@lwn$(echo .)net \
    --cc=davem@davemloft$(echo .)net \
    --cc=devel@linux-ipsec$(echo .)org \
    --cc=dsahern@kernel$(echo .)org \
    --cc=edumazet@google$(echo .)com \
    --cc=evitayan@google$(echo .)com \
    --cc=herbert@gondor$(echo .)apana.org.au \
    --cc=horms@kernel$(echo .)org \
    --cc=kuba@kernel$(echo .)org \
    --cc=linux-doc@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=nakam@linux-ipv6$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=omosnace@redhat$(echo .)com \
    --cc=pabeni@redhat$(echo .)com \
    --cc=paul@paul-moore$(echo .)com \
    --cc=selinux@vger$(echo .)kernel.org \
    --cc=skhan@linuxfoundation$(echo .)org \
    --cc=steffen.klassert@secunet$(echo .)com \
    --cc=stephen.smalley.work@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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