]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
selftests: icmp_redirect: remove from checking for IPv6 route get
authorHangbin Liu <liuhangbin@gmail.com>
Wed, 7 Jul 2021 08:15:29 +0000 (16:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jul 2021 11:30:53 +0000 (13:30 +0200)
[ Upstream commit 24b671aad4eae423e1abf5b7f08d9a5235458b8d ]

If the kernel doesn't enable option CONFIG_IPV6_SUBTREES, the RTA_SRC
info will not be exported to userspace in rt6_fill_node(). And ip cmd will
not print "from ::" to the route output. So remove this check.

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>
tools/testing/selftests/net/icmp_redirect.sh

index bf361f30d6ef912e0b857914c31a419a960fa9c2..bfcabee5015528ff54eaae28c88c3f1a0ea2d5bc 100755 (executable)
@@ -311,7 +311,7 @@ check_exception()
 
        if [ "$with_redirect" = "yes" ]; then
                ip -netns h1 -6 ro get ${H1_VRF_ARG} ${H2_N2_IP6} | \
-               grep -q "${H2_N2_IP6} from :: via ${R2_LLADDR} dev br0.*${mtu}"
+               grep -q "${H2_N2_IP6} .*via ${R2_LLADDR} dev br0.*${mtu}"
        elif [ -n "${mtu}" ]; then
                ip -netns h1 -6 ro get ${H1_VRF_ARG} ${H2_N2_IP6} | \
                grep -q "${mtu}"