Files
Pierre-Yves Le Borgne 2fbe8e79d9 main: accept Multipath TCP connections with listen-mptcp
With the new listen-mptcp option, the TCP listening sockets are created
with IPPROTO_MPTCP, so that clients supporting Multipath TCP can spread
the TLS connection over several paths and keep it when one path fails.
Clients without MPTCP support still connect: the kernel falls back to
TCP for them.

If the kernel refuses MPTCP sockets (built without MPTCP, the
net.mptcp.enabled sysctl set to 0, or Linux older than 5.6), ocserv
logs a warning and listens with TCP. Socket-activated listeners are
created by systemd, so the option cannot change them; ocserv warns when
listen-mptcp is set and the socket it was passed is not an MPTCP one,
and the sample socket unit documents SocketProtocol=mptcp. UDP (DTLS)
listeners are unchanged.

tests/test-listen-mptcp makes openconnect connect with MPTCP through an
LD_PRELOAD shim, as mptcpize does, and checks that occtl lists the
session as connected, that its worker holds an MPTCP socket and that the
tunnel carries traffic. The kernels of GitLab's hosted runners have no
MPTCP, so the new mptcp/Fedora CI job runs the MPTCP tests in a
virtme-ng guest with the Fedora image's kernel (build-images provides
the kernel, QEMU and virtme-ng), where OCSERV_TEST_REQUIRE_MPTCP=1 makes
them fail instead of skipping.

Adds REQ-MAIN-INIT-007 and REQ-MAIN-INIT-008.

Resolves: #762

Signed-off-by: Pierre-Yves Le Borgne <pylaterreur@gmail.com>
2026-11-12 22:05:20 +00:00
..