Commit 0f588040 authored by Hangbin Liu's avatar Hangbin Liu Committed by Jakub Kicinski
Browse files

selftests/net: ensure mptcp is enabled in netns



Some distributions may not enable MPTCP by default. All other MPTCP tests
source mptcp_lib.sh to ensure MPTCP is enabled before testing. However,
the ip_local_port_range test is the only one that does not include this
step.

Let's also ensure MPTCP is enabled in netns for ip_local_port_range so
that it passes on all distributions.

Suggested-by: default avatarDavide Caratti <dcaratti@redhat.com>
Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
Acked-by: default avatarMatthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250224094013.13159-1-liuhangbin@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent fc916719
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2,4 +2,6 @@
# SPDX-License-Identifier: GPL-2.0

./in_netns.sh \
  sh -c 'sysctl -q -w net.ipv4.ip_local_port_range="40000 49999" && ./ip_local_port_range'
  sh -c 'sysctl -q -w net.mptcp.enabled=1 && \
         sysctl -q -w net.ipv4.ip_local_port_range="40000 49999" && \
         ./ip_local_port_range'