From: Yu Watanabe Date: Wed, 23 Feb 2022 23:20:44 +0000 (+0900) Subject: network: create stacked netdevs after the underlying link is activated X-Git-Tag: v251-rc1~225^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=047b9991a4d0d93d0dfe3d144410c619a8b74699;p=thirdparty%2Fsystemd.git network: create stacked netdevs after the underlying link is activated Otherwise, the activation policy for the netdevs are ignored. Fixes #22593. --- 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)