ipv4: nexthop version of fib_info_nh_uses_dev
authorDavid Ahern <dsahern@gmail.com>
Tue, 26 May 2020 18:56:18 +0000 (12:56 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jun 2020 06:21:37 +0000 (08:21 +0200)
commit35c0a6e7ef5524bd58a66d42d5859ec3ce1baf48
tree7d62ba807d6f2c102a90d68f13ca136d040c48d8
parent568c159356d1ae93f5273dc511d0fa375305f0e7
ipv4: nexthop version of fib_info_nh_uses_dev

commit 1fd1c768f3624a5e66766e7b4ddb9b607cd834a5 upstream.

Similar to the last path, need to fix fib_info_nh_uses_dev for
external nexthops to avoid referencing multiple nh_grp structs.
Move the device check in fib_info_nh_uses_dev to a helper and
create a nexthop version that is called if the fib_info uses an
external nexthop.

Fixes: 430a049190de ("nexthop: Add support for nexthop groups")
Signed-off-by: David Ahern <dsahern@gmail.com>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/ip_fib.h
include/net/nexthop.h
net/ipv4/fib_frontend.c