Message ID | 20210707081530.1107289-3-liuhangbin@gmail.com |
---|---|
State | New |
Headers | show |
Series | Fix selftests icmp_redirect.sh failures | expand |
On 7/7/21 2:15 AM, Hangbin Liu wrote: > 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> > --- > tools/testing/selftests/net/icmp_redirect.sh | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/tools/testing/selftests/net/icmp_redirect.sh b/tools/testing/selftests/net/icmp_redirect.sh > index 3a111ac1edc3..ecbf57f264ed 100755 > --- a/tools/testing/selftests/net/icmp_redirect.sh > +++ b/tools/testing/selftests/net/icmp_redirect.sh > @@ -313,9 +313,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}" > Reviewed-by: David Ahern <dsahern@kernel.org>
diff --git a/tools/testing/selftests/net/icmp_redirect.sh b/tools/testing/selftests/net/icmp_redirect.sh index 3a111ac1edc3..ecbf57f264ed 100755 --- a/tools/testing/selftests/net/icmp_redirect.sh +++ b/tools/testing/selftests/net/icmp_redirect.sh @@ -313,9 +313,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}"
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> --- tools/testing/selftests/net/icmp_redirect.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)