We checked if the link is up only when configuring (explicit) nexthop,
but we did not checked that when configuring route which has (implicit)
nexthop.
Let's move the checks from nexthop_is_ready_to_configure() to
gateway_is_ready(), which is called for both implicit and explict
nexthops.
Fixes #40106.
if (nexthop_bound_to_link(nexthop)) {
assert(nexthop->ifindex == link->ifindex);
- if (link->set_flags_messages > 0)
- return false;
- if (!link_is_up(link))
- return false;
-
return gateway_is_ready(link, FLAGS_SET(nexthop->flags, RTNH_F_ONLINK), nexthop->family, &nexthop->gw.address);
}
assert(link);
assert(link->manager);
+ if (link->set_flags_messages > 0)
+ return false;
+
+ if (!link_is_up(link))
+ return false;
+
if (onlink)
return true;