summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-12-07 07:18:29 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-12-07 15:58:25 +0900
commit543240f5939f545623985d30c677784126c98eca (patch)
treee389bf89c3b71b2b210ba01837cf0b92f69645d0
parentf7144e7b0f146799ffde7cda13788fd9712c4326 (diff)
downloadsystemd-543240f5939f545623985d30c677784126c98eca.tar.gz
network/netdev: drop spurious state from the condition to create stacked netdevs
Stacked netdevs are requested when the underlying interface is in configuring state.
-rw-r--r--src/network/netdev/netdev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
index 7797f2a693..b4121dd473 100644
--- a/src/network/netdev/netdev.c
+++ b/src/network/netdev/netdev.c
@@ -617,8 +617,10 @@ static bool netdev_is_ready_to_create(NetDev *netdev, Link *link) {
if (netdev->state != NETDEV_STATE_LOADING)
return false;
- if (!IN_SET(link->state, LINK_STATE_INITIALIZED, LINK_STATE_CONFIGURING, LINK_STATE_CONFIGURED))
+
+ if (!IN_SET(link->state, LINK_STATE_CONFIGURING, LINK_STATE_CONFIGURED))
return false;
+
if (netdev_get_create_type(netdev) == NETDEV_CREATE_AFTER_CONFIGURED &&
link->state != LINK_STATE_CONFIGURED)
return false;