* [PATCH] selftests: netfilter: ipvs.sh: Explicity disable rp_filter on interface tunl0
@ 2025-07-24 2:43 Yi Chen
2025-07-24 6:15 ` Hangbin Liu
0 siblings, 1 reply; 2+ messages in thread
From: Yi Chen @ 2025-07-24 2:43 UTC (permalink / raw)
To: netdev
Cc: netfilter-devel, linux-kselftest, linux-kernel, pablo, kadlec,
davem, edumazet, kuba, pabeni, shuah, horms, coreteam, fw
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, this in script 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: ("7c8b89ec5 selftests: netfilter: remove rp_filter configuration")
Signed-off-by: Yi Chen <yiche@redhat.com>
---
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.50.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] selftests: netfilter: ipvs.sh: Explicity disable rp_filter on interface tunl0
2025-07-24 2:43 [PATCH] selftests: netfilter: ipvs.sh: Explicity disable rp_filter on interface tunl0 Yi Chen
@ 2025-07-24 6:15 ` Hangbin Liu
0 siblings, 0 replies; 2+ messages in thread
From: Hangbin Liu @ 2025-07-24 6:15 UTC (permalink / raw)
To: Yi Chen
Cc: netdev, netfilter-devel, linux-kselftest, linux-kernel, pablo,
kadlec, davem, edumazet, kuba, pabeni, shuah, horms, coreteam, fw
Hi Chen Yi,
For the subject, please specify the target repo. e.g.
[PATCH net] or [PATCH netfilter]
On Thu, Jul 24, 2025 at 10:43:39AM +0800, Yi Chen wrote:
> 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, this in script 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: ("7c8b89ec5 selftests: netfilter: remove rp_filter configuration")
Should be
Fixes: 7c8b89ec506e ("selftests: netfilter: remove rp_filter configuration")
Thanks
Hangbin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-24 6:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-24 2:43 [PATCH] selftests: netfilter: ipvs.sh: Explicity disable rp_filter on interface tunl0 Yi Chen
2025-07-24 6:15 ` Hangbin Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).