Skip to content

Commit 6c75b21

Browse files
liuhangbingregkh
authored andcommitted
selftests: icmp_redirect: IPv6 PMTU info should be cleared after redirect
[ 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>
1 parent 84d3787 commit 6c75b21

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎tools/testing/selftests/net/icmp_redirect.sh‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,10 @@ check_exception()
309309
fi
310310
log_test $? 0 "IPv4: ${desc}"
311311

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

0 commit comments

Comments
 (0)