Skip to content

Commit 29a25ba

Browse files
author
CKI Backport Bot
committed
selftests: netfilter: ipvs.sh: Explicity disable rp_filter on interface tunl0
JIRA: https://issues.redhat.com/browse/RHEL-115594 commit 8b4a1a4 Author: Yi Chen <yiche@redhat.com> Date: Thu Jul 24 16:06:53 2025 +0800 selftests: netfilter: ipvs.sh: Explicity disable rp_filter on interface tunl0 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: 7c8b89e ("selftests: netfilter: remove rp_filter configuration") Signed-off-by: Yi Chen <yiche@redhat.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
1 parent 1b864e3 commit 29a25ba

File tree

1 file changed

+2
-2
lines changed
  • tools/testing/selftests/net/netfilter

1 file changed

+2
-2
lines changed

tools/testing/selftests/net/netfilter/ipvs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ test_nat() {
151151
test_tun() {
152152
ip netns exec "${ns0}" ip route add "${vip_v4}" via "${gip_v4}" dev br0
153153

154-
ip netns exec "${ns1}" modprobe -q ipip
154+
modprobe -q ipip
155155
ip netns exec "${ns1}" ip link set tunl0 up
156156
ip netns exec "${ns1}" sysctl -qw net.ipv4.ip_forward=0
157157
ip netns exec "${ns1}" sysctl -qw net.ipv4.conf.all.send_redirects=0
@@ -160,10 +160,10 @@ test_tun() {
160160
ip netns exec "${ns1}" ipvsadm -a -i -t "${vip_v4}:${port}" -r ${rip_v4}:${port}
161161
ip netns exec "${ns1}" ip addr add ${vip_v4}/32 dev lo:1
162162

163-
ip netns exec "${ns2}" modprobe -q ipip
164163
ip netns exec "${ns2}" ip link set tunl0 up
165164
ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.all.arp_ignore=1
166165
ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.all.arp_announce=2
166+
ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.tunl0.rp_filter=0
167167
ip netns exec "${ns2}" ip addr add "${vip_v4}/32" dev lo:1
168168

169169
test_service

0 commit comments

Comments
 (0)