diff mbox

[net-next,mlxsw] selftests: forwarding: mirror_gre_nh: Unset RP filter

Message ID 131d104fc62fb8b44e0749b6eb7d4f2256cb3927.1525275645.git.petrm@mellanox.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Petr Machata May 2, 2018, 3:44 p.m. UTC
The test fails to work if reverse-path filtering is in effect on the
mirrored-to host interface, or for all interfaces.

Signed-off-by: Petr Machata <petrm@mellanox.com>
---
 tools/testing/selftests/net/forwarding/mirror_gre_nh.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Ido Schimmel May 3, 2018, 6:39 a.m. UTC | #1
On Wed, May 02, 2018 at 05:44:29PM +0200, Petr Machata wrote:
> The test fails to work if reverse-path filtering is in effect on the
> mirrored-to host interface, or for all interfaces.
> 
> Signed-off-by: Petr Machata <petrm@mellanox.com>

Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Ido Schimmel May 3, 2018, 6:42 a.m. UTC | #2
I'll apply it to our tree so that the test won't fail again tonight.
diff mbox

Patch

diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh b/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh
index a0d1ad4..3575e9b 100755
--- a/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh
@@ -29,6 +29,11 @@  setup_prepare()
 	swp3=${NETIFS[p5]}
 	h3=${NETIFS[p6]}
 
+	all_rp_filter=$(sysctl -n net.ipv4.conf.all.rp_filter)
+	h3_rp_filter=$(sysctl -n net.ipv4.conf.$h3.rp_filter)
+	sysctl -qw net.ipv4.conf.all.rp_filter=0
+	sysctl -qw net.ipv4.conf.$h3.rp_filter=0
+
 	vrf_prepare
 	mirror_gre_topo_create
 
@@ -60,6 +65,9 @@  cleanup()
 
 	mirror_gre_topo_destroy
 	vrf_cleanup
+
+	sysctl -qw net.ipv4.conf.$h3.rp_filter=$h3_rp_filter
+	sysctl -qw net.ipv4.conf.all.rp_filter=$all_rp_filter
 }
 
 test_gretap()