]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network/nexthop: drop dead code
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 14 Dec 2023 19:30:24 +0000 (04:30 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 20 Dec 2023 19:22:46 +0000 (04:22 +0900)
Follow-up for a533473a48ff05e84e7af3d4049dbf458b6c0f94.

src/network/networkd-nexthop.c

index aeb33ae8d603a6d37ccd3f586c649146c33508fb..5d86f19805ea543dd34870015dbcfb0c7b390043 100644 (file)
@@ -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);
 }