]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ipv6/route: return if there is no fib_nh_gw_family
authorHangbin Liu <liuhangbin@gmail.com>
Wed, 20 Nov 2019 07:39:06 +0000 (15:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Nov 2019 09:07:38 +0000 (10:07 +0100)
[ Upstream commit 004b39427f945696db30abb2c4e1a3856ffff819 ]

Previously we will return directly if (!rt || !rt->fib6_nh.fib_nh_gw_family)
in function rt6_probe(), but after commit cc3a86c802f0
("ipv6: Change rt6_probe to take a fib6_nh"), the logic changed to
return if there is fib_nh_gw_family.

Fixes: cc3a86c802f0 ("ipv6: Change rt6_probe to take a fib6_nh")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/route.c

index 2b25a0de03649be96515e31ff23f3e97c899a332..56c8c990b6f2ae9ebe4fe68d5ac7761feb9219f8 100644 (file)
@@ -634,7 +634,7 @@ static void rt6_probe(struct fib6_nh *fib6_nh)
         * Router Reachability Probe MUST be rate-limited
         * to no more than one per minute.
         */
-       if (fib6_nh->fib_nh_gw_family)
+       if (!fib6_nh->fib_nh_gw_family)
                return;
 
        nh_gw = &fib6_nh->fib_nh_gw6;