]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: create stacked netdevs after the underlying link is activated
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 23 Feb 2022 23:20:44 +0000 (08:20 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 23 Feb 2022 23:37:26 +0000 (08:37 +0900)
Otherwise, the activation policy for the netdevs are ignored.

Fixes #22593.

src/network/netdev/netdev.c

index 8f68a50297feb7483ea8d915fb8a848af8e67c46..52643cf3c39d21bddfc66979d9497fae95e402e5 100644 (file)
@@ -643,6 +643,11 @@ static int netdev_is_ready_to_create(NetDev *netdev, Link *link) {
 
                 if (link->set_link_messages > 0)
                         return false;
+
+                /* If stacked netdevs are created before the underlying interface being activated, then
+                 * the activation policy for the netdevs are ignored. See issue #22593. */
+                if (!link->activated)
+                        return false;
         }
 
         if (NETDEV_VTABLE(netdev)->is_ready_to_create)