diff --git a/src/network/networkd-nexthop.c b/src/network/networkd-nexthop.c index aeb33ae8d6..5d86f19805 100644 --- a/src/network/networkd-nexthop.c +++ b/src/network/networkd-nexthop.c @@ -555,6 +555,7 @@ static bool nexthop_is_ready_to_configure(Link *link, const NextHop *nexthop) { assert(link); assert(nexthop); + assert(nexthop->id > 0); if (!link_is_ready_to_configure(link, false)) return false; @@ -582,17 +583,6 @@ static bool nexthop_is_ready_to_configure(Link *link, const NextHop *nexthop) { return false; } - if (nexthop->id == 0) { - Request *req; - - ORDERED_SET_FOREACH(req, link->manager->request_queue) { - if (req->type != REQUEST_TYPE_NEXTHOP) - continue; - if (((NextHop*) req->userdata)->id != 0) - return false; /* first configure nexthop with id. */ - } - } - return gateway_is_ready(link, FLAGS_SET(nexthop->flags, RTNH_F_ONLINK), nexthop->family, &nexthop->gw); }