]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
selftests: forwarding: mirror_gre_nh: Unset RP filter
authorPetr Machata <petrm@mellanox.com>
Thu, 3 May 2018 10:37:21 +0000 (12:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 May 2018 17:37:02 +0000 (13:37 -0400)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/forwarding/mirror_gre_nh.sh

index a0d1ad46a2bcae68f70cd575c166b40eb2fb9e5a..8fa681eb90e72dee85fa5fc9c44f7b9d0f45a622 100755 (executable)
@@ -29,6 +29,9 @@ setup_prepare()
        swp3=${NETIFS[p5]}
        h3=${NETIFS[p6]}
 
+       sysctl_set net.ipv4.conf.all.rp_filter 0
+       sysctl_set net.ipv4.conf.$h3.rp_filter 0
+
        vrf_prepare
        mirror_gre_topo_create
 
@@ -60,6 +63,9 @@ cleanup()
 
        mirror_gre_topo_destroy
        vrf_cleanup
+
+       sysctl_restore net.ipv4.conf.$h3.rp_filter
+       sysctl_restore net.ipv4.conf.all.rp_filter
 }
 
 test_gretap()