Linux-kselftest Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] selftests: fix rp_filter testcase failure bug
@ 2021-04-15 12:23 Qiao Ma
  0 siblings, 0 replies; only message in thread
From: Qiao Ma @ 2021-04-15 12:23 UTC (permalink / raw)
  To: linux-kselftest; +Cc: shuah

The rp_filter testcase is used to test whether local packets redirected
from dummy1 to lo could pass the checking of rp_filter.

In fact, the packets passed the checking, but the testing process cannot
receive any reply packets, leading to test failure. The reason is that
the device dummy1 lacks ip address, caused the incorrect routing of
reply packets.

This patch adds ip address for dummy1 device.

Signed-off-by: Qiao Ma <mqaio@linux.alibaba.com>
---
 tools/testing/selftests/net/fib_tests.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh
index 2b5707738609..9a843ca0b913 100755
--- a/tools/testing/selftests/net/fib_tests.sh
+++ b/tools/testing/selftests/net/fib_tests.sh
@@ -448,6 +448,7 @@ fib_rp_filter_test()
 	$IP link set dummy0 address 52:54:00:6a:c7:5e
 	$IP link add dummy1 type dummy
 	$IP link set dummy1 address 52:54:00:6a:c7:5e
+	$IP address add 198.51.101.1/24 dev dummy1
 	$IP link set dev dummy1 up
 	$NS_EXEC sysctl -qw net.ipv4.conf.all.rp_filter=1
 	$NS_EXEC sysctl -qw net.ipv4.conf.all.accept_local=1
-- 
2.18.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15 12:23 [PATCH] selftests: fix rp_filter testcase failure bug Qiao Ma

Linux-kselftest Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-kselftest/0 linux-kselftest/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-kselftest linux-kselftest/ https://lore.kernel.org/linux-kselftest \
		linux-kselftest@vger.kernel.org
	public-inbox-index linux-kselftest

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kselftest


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git