summaryrefslogtreecommitdiff
path: root/src/network/netdev/netdev.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-02-24 08:20:44 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-02-24 08:37:26 +0900
commit047b9991a4d0d93d0dfe3d144410c619a8b74699 (patch)
treeff0e4d2551b72984081d3fe19dc55750b6ebd220 /src/network/netdev/netdev.c
parent0802f62efc1d1c67d5be67223b529c93536cf2ed (diff)
downloadsystemd-047b9991a4d0d93d0dfe3d144410c619a8b74699.tar.gz
network: create stacked netdevs after the underlying link is activated
Otherwise, the activation policy for the netdevs are ignored. Fixes #22593.
Diffstat (limited to 'src/network/netdev/netdev.c')
-rw-r--r--src/network/netdev/netdev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
index 8f68a50297..52643cf3c3 100644
--- a/src/network/netdev/netdev.c
+++ b/src/network/netdev/netdev.c
@@ -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)