aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHangbin Liu <liuhangbin@gmail.com>2021-07-07 16:15:30 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-28 14:35:34 +0200
commitf1edbcc47f460a255c459e3fbb3751d735093011 (patch)
treef7985eef0b7db9b59c4d6f3d2cbaceead7aae63d
parent906bbb18db782d8d7f77764bbf69d5733796870a (diff)
downloadkernel_replicant_linux-f1edbcc47f460a255c459e3fbb3751d735093011.tar.gz
kernel_replicant_linux-f1edbcc47f460a255c459e3fbb3751d735093011.tar.bz2
kernel_replicant_linux-f1edbcc47f460a255c459e3fbb3751d735093011.zip
selftests: icmp_redirect: IPv6 PMTU info should be cleared after redirect
[ Upstream commit 0e02bf5de46ae30074a2e1a8194a422a84482a1a ] 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: ec8105352869 ("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>
-rwxr-xr-xtools/testing/selftests/net/icmp_redirect.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/testing/selftests/net/icmp_redirect.sh b/tools/testing/selftests/net/icmp_redirect.sh
index bfcabee50155..104a7a5f13b1 100755
--- a/tools/testing/selftests/net/icmp_redirect.sh
+++ b/tools/testing/selftests/net/icmp_redirect.sh
@@ -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}"