From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F27C52FE57E; Tue, 12 Aug 2025 18:42:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755024163; cv=none; b=kuxBRqzbcqVjmO9zg0SeCrf8tTFXTFeGMDF+eJcejBj1nav/v+j0T7v8DPdOL/+SWk+Dfq7En0GAelUQ31VZEevtsnHBzbILMDne6iDp+hiDQfTOhAyznFKLEDExf2Uubz7lU8TDw9u4FQE8EKcpTXs/1FIZiyGjk1vvbRv/ZK8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755024163; c=relaxed/simple; bh=lfQcjPaNQfDNEx2cdYpPZem0Yp6vRxtpZ8QJJxm8YxY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bx8Y6HC6IuAbsB20vDSZPo9iVx0LnxbtFOJPXLc42nMktAzck3AEBLSqVoOFwLT+LMJBKEH+tyPnJ82FtuahbLiwPcRuzI7e4Ujw0f2NY+sYv2DeBNnPNgDFJEa/x8379zfHYEN10c1CJL+9T0W+rK/+Jhv0UkVJUf8xigqO25U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yTDC34o+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="yTDC34o+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3735AC4CEF0; Tue, 12 Aug 2025 18:42:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755024162; bh=lfQcjPaNQfDNEx2cdYpPZem0Yp6vRxtpZ8QJJxm8YxY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yTDC34o+srLW4ubmrSgEDRE4kTCFO+K0CF8WPMufnctU3llaQdXLxZxbI/9kF8t6f Xn3IotES/B787jrPSViPf4cBvOYoi0DYvZTlXFOFRCSvoOsap/Pe5fw16ccCU1ROs8 Kv1mmkZNOMoeRnHtEHQDdLWb2us9RTiuM/G1BO9A= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yi Chen , Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 6.16 275/627] selftests: netfilter: ipvs.sh: Explicity disable rp_filter on interface tunl0 Date: Tue, 12 Aug 2025 19:29:30 +0200 Message-ID: <20250812173429.772268828@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250812173419.303046420@linuxfoundation.org> References: <20250812173419.303046420@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yi Chen [ Upstream commit 8b4a1a46e84a17f5d6fde5c506cc6bb141a24772 ] Although setup_ns() set net.ipv4.conf.default.rp_filter=0, loading certain module such as ipip will automatically create a tunl0 interface in all netns including new created ones. In the script, this is before than default.rp_filter=0 applied, as a result tunl0.rp_filter remains set to 1 which causes the test report FAIL when ipip module is preloaded. Before fix: Testing DR mode... Testing NAT mode... Testing Tunnel mode... ipvs.sh: FAIL After fix: Testing DR mode... Testing NAT mode... Testing Tunnel mode... ipvs.sh: PASS Fixes: 7c8b89ec506e ("selftests: netfilter: remove rp_filter configuration") Signed-off-by: Yi Chen Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin --- tools/testing/selftests/net/netfilter/ipvs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/netfilter/ipvs.sh b/tools/testing/selftests/net/netfilter/ipvs.sh index 6af2ea3ad6b8..9c9d5b38ab71 100755 --- a/tools/testing/selftests/net/netfilter/ipvs.sh +++ b/tools/testing/selftests/net/netfilter/ipvs.sh @@ -151,7 +151,7 @@ test_nat() { test_tun() { ip netns exec "${ns0}" ip route add "${vip_v4}" via "${gip_v4}" dev br0 - ip netns exec "${ns1}" modprobe -q ipip + modprobe -q ipip ip netns exec "${ns1}" ip link set tunl0 up ip netns exec "${ns1}" sysctl -qw net.ipv4.ip_forward=0 ip netns exec "${ns1}" sysctl -qw net.ipv4.conf.all.send_redirects=0 @@ -160,10 +160,10 @@ test_tun() { ip netns exec "${ns1}" ipvsadm -a -i -t "${vip_v4}:${port}" -r ${rip_v4}:${port} ip netns exec "${ns1}" ip addr add ${vip_v4}/32 dev lo:1 - ip netns exec "${ns2}" modprobe -q ipip ip netns exec "${ns2}" ip link set tunl0 up ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.all.arp_ignore=1 ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.all.arp_announce=2 + ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.tunl0.rp_filter=0 ip netns exec "${ns2}" ip addr add "${vip_v4}/32" dev lo:1 test_service -- 2.39.5