#1069155 libreswan: TCP encapsulation fails for lack of support in kernel build config

Package:
libreswan
Source:
libreswan
Description:
Internet Key Exchange daemon
Submitter:
Mathieu Baudier
Date:
2025-03-06 11:30:03 UTC
Severity:
normal
#1069155#5
Date:
2024-04-17 07:49:22 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?

Trying to use TCP encapsulation (enable-tcp=yes) between two Debian 12 hosts,
in order to work around the connection freezing after a while when using
defaults.

On the client (initiator, roaming) we get:

ERROR setsockopt(SOL_TCP, TCP_ULP) failed (connect_to_tcp_endpoint() +546
/programs/pluto/iface_tcp.c): No such file or directory (errno 2)

On the server (responder, online server) we get:

IKETCP ACCEPTED: socket 14: accepted connection
IKETCP ACCEPTED: socket 14: closing socket; setsockopt(14, SOL_TCP, TCP_ULP,
"espintcp") failed: No such file or directory (errno 2)

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

Issue raised to libreswan developers
https://github.com/libreswan/libreswan/issues/1681

who helped with the analysis.

   * What was the outcome of this action?

It appears that the following config parameters are required when building the
kernel:

CONFIG_XFRM_ESPINTCP=y
CONFIG_INET_ESPINTCP=y

But they are not available in the config file:

$ cat /boot/config-$(uname -r) | grep ESPINTCP
# CONFIG_INET_ESPINTCP is not set
# CONFIG_INET6_ESPINTCP is not set

$ cat /boot/config-$(uname -r) | grep CONFIG_XFRM_ESPINTCP
<empty>

Is it thinkable to ask for these kernel build config parameters to be enabled
in Debian Stable at some point, or is it a no-go?

#1069155#10
Date:
2025-03-06 11:19:39 UTC
From:
To:
Since this bug should be solved by building the kernel with the
following flags:

CONFIG_XFRM_ESPINTCP=y
CONFIG_INET_ESPINTCP=y

is it more appropriate to refer to a kernel-related package?