From 047b9991a4d0d93d0dfe3d144410c619a8b74699 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 24 Feb 2022 08:20:44 +0900 Subject: [PATCH] network: create stacked netdevs after the underlying link is activated Otherwise, the activation policy for the netdevs are ignored. Fixes #22593. --- src/network/netdev/netdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c index 8f68a50297f..52643cf3c39 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) -- 2.47.3