nexthop: Factor out neighbor validity check
authorBenjamin Poirier <bpoirier@nvidia.com>
Wed, 19 Jul 2023 13:57:16 +0000 (13:57 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 21 Jul 2023 03:23:20 +0000 (20:23 -0700)
commit4bb5239b43348f4a1cd73f44be3dc57ac653ae9c
treeb0c940283d9fa27faac73d9690da3e9957163d67
parenteedd47a6ec9f683f0b8d931aacca81985be55eec
nexthop: Factor out neighbor validity check

For legacy nexthops, there is fib_good_nh() to check the neighbor validity.
In order to make the nexthop object code more similar to the legacy nexthop
code, factor out the nexthop object neighbor validity check into its own
function.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20230719-nh_select-v2-2-04383e89f868@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/nexthop.c