netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH ipsec-next] pfkey: Deprecate pfkey
@ 2025-10-22  6:10 Steffen Klassert
  2025-10-22  8:05 ` Herbert Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Steffen Klassert @ 2025-10-22  6:10 UTC (permalink / raw)
  To: Herbert Xu, Paul Wouters, Andreas Steffen, Tobias Brunner,
	Antony Antony, Tuomo Soini, David S. Miller, Florian Westphal
  Cc: netdev, devel

The pfkey user configuration interface was replaced by the netlink
user configuration interface more than a decade ago. In between
all maintained IKE implementations moved to the netlink interface.
So let config NET_KEY default to no in Kconfig. The pfkey code
will be remoced in a secomd step.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Antony Antony <antony.antony@secunet.com>
Acked-by: Tobias Brunner <tobias@strongswan.org>
---

Antony, Tobias, I kept the Acked-by tags from the RFC version.
Let me know if that's ok.

 net/key/af_key.c |  2 ++
 net/xfrm/Kconfig | 11 +++++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/net/key/af_key.c b/net/key/af_key.c
index 2ebde0352245..571200433aa9 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -3903,6 +3903,8 @@ static int __init ipsec_pfkey_init(void)
 {
 	int err = proto_register(&key_proto, 0);
 
+	pr_warn_once("PFKEY is deprecated and scheduled to be removed in 2027, "
+	             "please contact the netdev mailing list\n");
 	if (err != 0)
 		goto out;
 
diff --git a/net/xfrm/Kconfig b/net/xfrm/Kconfig
index f0157702718f..4a62817a88f8 100644
--- a/net/xfrm/Kconfig
+++ b/net/xfrm/Kconfig
@@ -110,14 +110,17 @@ config XFRM_IPCOMP
 	select CRYPTO_DEFLATE
 
 config NET_KEY
-	tristate "PF_KEY sockets"
+	tristate "PF_KEY sockets (deprecated)"
 	select XFRM_ALGO
 	help
 	  PF_KEYv2 socket family, compatible to KAME ones.
-	  They are required if you are going to use IPsec tools ported
-	  from KAME.
 
-	  Say Y unless you know what you are doing.
+	  The PF_KEYv2 socket interface is deprecated and
+	  scheduled for removal. All maintained IKE daemons
+	  no longer need PF_KEY sockets. Please use the netlink
+	  interface (XFRM_USER) to configure IPsec.
+
+	  If unsure, say N.
 
 config NET_KEY_MIGRATE
 	bool "PF_KEY MIGRATE"
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH ipsec-next] pfkey: Deprecate pfkey
  2025-10-22  6:10 [PATCH ipsec-next] pfkey: Deprecate pfkey Steffen Klassert
@ 2025-10-22  8:05 ` Herbert Xu
  2025-10-22 22:11 ` Sabrina Dubroca
  2025-10-23 15:11 ` Paul Wouters
  2 siblings, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2025-10-22  8:05 UTC (permalink / raw)
  To: Steffen Klassert
  Cc: Paul Wouters, Andreas Steffen, Tobias Brunner, Antony Antony,
	Tuomo Soini, David S. Miller, Florian Westphal, netdev, devel

On Wed, Oct 22, 2025 at 08:10:51AM +0200, Steffen Klassert wrote:
> The pfkey user configuration interface was replaced by the netlink
> user configuration interface more than a decade ago. In between
> all maintained IKE implementations moved to the netlink interface.
> So let config NET_KEY default to no in Kconfig. The pfkey code
> will be remoced in a secomd step.
> 
> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
> Acked-by: Antony Antony <antony.antony@secunet.com>
> Acked-by: Tobias Brunner <tobias@strongswan.org>
> ---
> 
> Antony, Tobias, I kept the Acked-by tags from the RFC version.
> Let me know if that's ok.
> 
>  net/key/af_key.c |  2 ++
>  net/xfrm/Kconfig | 11 +++++++----
>  2 files changed, 9 insertions(+), 4 deletions(-)

Acked-by: Herbert Xu <herbert@gondor.apana.org.au>

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH ipsec-next] pfkey: Deprecate pfkey
  2025-10-22  6:10 [PATCH ipsec-next] pfkey: Deprecate pfkey Steffen Klassert
  2025-10-22  8:05 ` Herbert Xu
@ 2025-10-22 22:11 ` Sabrina Dubroca
  2025-10-23 15:11 ` Paul Wouters
  2 siblings, 0 replies; 4+ messages in thread
From: Sabrina Dubroca @ 2025-10-22 22:11 UTC (permalink / raw)
  To: Steffen Klassert
  Cc: Herbert Xu, Paul Wouters, Andreas Steffen, Tobias Brunner,
	Antony Antony, Tuomo Soini, David S. Miller, Florian Westphal,
	netdev, devel

2025-10-22, 08:10:51 +0200, Steffen Klassert wrote:
> The pfkey user configuration interface was replaced by the netlink
> user configuration interface more than a decade ago. In between
> all maintained IKE implementations moved to the netlink interface.
> So let config NET_KEY default to no in Kconfig. The pfkey code
> will be remoced in a secomd step.

nit: typos: s/remoced/removed/ and s/secomd/second/

> 
> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
> Acked-by: Antony Antony <antony.antony@secunet.com>
> Acked-by: Tobias Brunner <tobias@strongswan.org>

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

The deprecation/removal plan sounds good to me.

-- 
Sabrina

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH ipsec-next] pfkey: Deprecate pfkey
  2025-10-22  6:10 [PATCH ipsec-next] pfkey: Deprecate pfkey Steffen Klassert
  2025-10-22  8:05 ` Herbert Xu
  2025-10-22 22:11 ` Sabrina Dubroca
@ 2025-10-23 15:11 ` Paul Wouters
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Wouters @ 2025-10-23 15:11 UTC (permalink / raw)
  To: Steffen Klassert
  Cc: Herbert Xu, Andreas Steffen, Tobias Brunner, Antony Antony,
	Tuomo Soini, David S. Miller, Florian Westphal, netdev, devel

On Wed, 22 Oct 2025, Steffen Klassert wrote:

> The pfkey user configuration interface was replaced by the netlink
> user configuration interface more than a decade ago. In between
> all maintained IKE implementations moved to the netlink interface.
> So let config NET_KEY default to no in Kconfig. The pfkey code
> will be remoced in a secomd step.

No supported libreswan version still uses the old NET_KEY PFKEY API.

Acked-by: Paul Wouters <paul@nohats.ca>

Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-10-23 15:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-22  6:10 [PATCH ipsec-next] pfkey: Deprecate pfkey Steffen Klassert
2025-10-22  8:05 ` Herbert Xu
2025-10-22 22:11 ` Sabrina Dubroca
2025-10-23 15:11 ` Paul Wouters

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).