Skip to content

Commit

Permalink
selftests: icmp_redirect: IPv6 PMTU info should be cleared after redi…
Browse files Browse the repository at this point in the history
…rect

[ Upstream commit 0e02bf5 ]

After redirecting, it's already a new path. So the old PMTU info should
be cleared. The IPv6 test "mtu exception plus redirect" should only
has redirect info without old PMTU.

The IPv4 test can not be changed because of legacy.

Fixes: ec81053 ("selftests: Add redirect tests")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
liuhangbin authored and gregkh committed Jul 28, 2021
1 parent 84d3787 commit 6c75b21
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/testing/selftests/net/icmp_redirect.sh
Expand Up @@ -309,9 +309,10 @@ check_exception()
fi
log_test $? 0 "IPv4: ${desc}"

if [ "$with_redirect" = "yes" ]; then
# No PMTU info for test "redirect" and "mtu exception plus redirect"
if [ "$with_redirect" = "yes" ] && [ "$desc" != "redirect exception plus mtu" ]; then
ip -netns h1 -6 ro get ${H1_VRF_ARG} ${H2_N2_IP6} | \
grep -q "${H2_N2_IP6} .*via ${R2_LLADDR} dev br0.*${mtu}"
grep -v "mtu" | grep -q "${H2_N2_IP6} .*via ${R2_LLADDR} dev br0"
elif [ -n "${mtu}" ]; then
ip -netns h1 -6 ro get ${H1_VRF_ARG} ${H2_N2_IP6} | \
grep -q "${mtu}"
Expand Down

0 comments on commit 6c75b21

Please sign in to comment.