]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network/netdev: create stacked netdevs after all set-link operations are finished
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 6 Dec 2021 20:47:31 +0000 (05:47 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 7 Dec 2021 06:58:25 +0000 (15:58 +0900)
E.g. setting MAC address must be done before creating VLAN interface.

src/network/netdev/netdev.c

index 9f9519fa50c66917bbdef26d6c90bbf912d2869b..7797f2a693d6f51fb319918ffcbd77817b4f9e91 100644 (file)
@@ -612,8 +612,6 @@ int netdev_join(NetDev *netdev, Link *link, link_netlink_message_handler_t callb
 }
 
 static bool netdev_is_ready_to_create(NetDev *netdev, Link *link) {
-        Request req;
-
         assert(netdev);
         assert(link);
 
@@ -625,13 +623,7 @@ static bool netdev_is_ready_to_create(NetDev *netdev, Link *link) {
             link->state != LINK_STATE_CONFIGURED)
                 return false;
 
-        req = (Request) {
-                .link = link,
-                .type = REQUEST_TYPE_SET_LINK,
-                .set_link_operation_ptr = INT_TO_PTR(SET_LINK_MTU),
-        };
-
-        if (ordered_set_contains(link->manager->request_queue, &req))
+        if (link->set_link_messages > 0)
                 return false;
 
         return true;