Skip to content

Commit

Permalink
selftests: forwarding: mirror_gre_nh: Unset rp_filter on host VRF
Browse files Browse the repository at this point in the history
The mirrored packets arrive at $h3 encapsulated in GRE/IPv4, with IP
address from 192.0.2.128/28 network. However the interface is configured
as a member of 192.0.2.160/28 and there's no route directing traffic
from the former network through that interface. Correspondingly, the RP
filter on the VRF rejects it.

Therefore turn off the VRF's RP filter.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Petr Machata authored and David S. Miller committed Jul 12, 2018
1 parent d90a521 commit 4280129
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/testing/selftests/net/forwarding/mirror_gre_nh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ setup_prepare()
vrf_prepare
mirror_gre_topo_create

sysctl_set net.ipv4.conf.v$h3.rp_filter 0

ip address add dev $swp3 192.0.2.161/28
ip address add dev $h3 192.0.2.162/28
ip address add dev gt4 192.0.2.129/32
Expand All @@ -61,6 +63,8 @@ cleanup()
ip address del dev $h3 192.0.2.162/28
ip address del dev $swp3 192.0.2.161/28

sysctl_restore net.ipv4.conf.v$h3.rp_filter 0

mirror_gre_topo_destroy
vrf_cleanup

Expand Down

0 comments on commit 4280129

Please sign in to comment.