summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh
diff options
context:
space:
mode:
authorPetr Machata <petrm@nvidia.com>2023-08-11 18:59:27 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-23 18:52:33 +0300
commit2f07f1302ecba4400b8471a5be26750b5cfd9364 (patch)
tree31bab9d843bdb375f872a6bb298bdbde70c4719b /tools/testing/selftests/net/forwarding/mirror_gre_changes.sh
parentcd4460b21741a58e5ac7bddfc6689b36a1b515a7 (diff)
downloadlinux-2f07f1302ecba4400b8471a5be26750b5cfd9364.tar.xz
selftests: mirror_gre_changes: Tighten up the TTL test match
[ Upstream commit 855067defa36b1f9effad8c219d9a85b655cf500 ] This test verifies whether the encapsulated packets have the correct configured TTL. It does so by sending ICMP packets through the test topology and mirroring them to a gretap netdevice. On a busy host however, more than just the test ICMP packets may end up flowing through the topology, get mirrored, and counted. This leads to potential spurious failures as the test observes much more mirrored packets than the sent test packets, and assumes a bug. Fix this by tightening up the mirror action match. Change it from matchall to a flower classifier matching on ICMP packets specifically. Fixes: 45315673e0c5 ("selftests: forwarding: Test changes in mirror-to-gretap") Signed-off-by: Petr Machata <petrm@nvidia.com> Tested-by: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/testing/selftests/net/forwarding/mirror_gre_changes.sh')
-rwxr-xr-xtools/testing/selftests/net/forwarding/mirror_gre_changes.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh b/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh
index aff88f78e339..5ea9d63915f7 100755
--- a/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh
@@ -72,7 +72,8 @@ test_span_gre_ttl()
RET=0
- mirror_install $swp1 ingress $tundev "matchall $tcflags"
+ mirror_install $swp1 ingress $tundev \
+ "prot ip flower $tcflags ip_prot icmp"
tc filter add dev $h3 ingress pref 77 prot $prot \
flower skip_hw ip_ttl 50 action pass