Skip to content

Commit 27a2628

Browse files
pmachatadavem330
authored andcommitted
selftests: forwarding: mirror_gre_vlan_bridge_1q: Unset rp_filter
The IP addresses of tunnel endpoint at H3 are set at the VLAN device $h3.555. Therefore when test_gretap_untagged_egress() sets vlan 555 to egress untagged at $swp3, $h3's rp_filter rejects these packets. The test then spuriously fails. Therefore turn off net.ipv4.conf.{all, $h3}.rp_filter. Fixes: 9c7c8a8 ("selftests: forwarding: mirror_gre_vlan_bridge_1q: Add more tests") Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 68cc444 commit 27a2628

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ setup_prepare()
3939
swp3=${NETIFS[p5]}
4040
h3=${NETIFS[p6]}
4141

42+
# gt4's remote address is at $h3.555, not $h3. Thus the packets arriving
43+
# directly to $h3 for test_gretap_untagged_egress() are rejected by
44+
# rp_filter and the test spuriously fails.
45+
sysctl_set net.ipv4.conf.all.rp_filter 0
46+
sysctl_set net.ipv4.conf.$h3.rp_filter 0
47+
4248
vrf_prepare
4349
mirror_gre_topo_create
4450

@@ -65,6 +71,9 @@ cleanup()
6571

6672
mirror_gre_topo_destroy
6773
vrf_cleanup
74+
75+
sysctl_restore net.ipv4.conf.$h3.rp_filter
76+
sysctl_restore net.ipv4.conf.all.rp_filter
6877
}
6978

7079
test_vlan_match()

0 commit comments

Comments
 (0)