]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: mptcp: close server file descriptors
authorGeliang Tang <tanggeliang@kylinos.cn>
Fri, 12 Sep 2025 16:36:47 +0000 (18:36 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 16 Sep 2025 01:14:22 +0000 (18:14 -0700)
commitdab86ee688ae03919648c871c603356818090797
treea91d06ead65cba0ee604784ee66e721e604e1f16
parentf3b52167a0cb23b27414452fbc1278da2ee884fc
selftests: mptcp: close server file descriptors

The server file descriptor ('fd') is opened in server() but never closed.
While accepted connections are properly closed in process_one_client(),
the main listening socket remains open, causing a resource leak.

This patch ensures the server fd is properly closed after processing
clients, bringing the sockopt and inq test cases in line with proper
resource cleanup practices.

Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250912-net-next-mptcp-minor-fixes-6-18-v1-1-99d179b483ad@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/mptcp_inq.c
tools/testing/selftests/net/mptcp/mptcp_sockopt.c