From a7f07cbe3403a9216f20f245811c1d6cb5925799 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sat, 29 May 2021 01:24:44 +0900 Subject: [PATCH] network: wait for all set-link requests are processed --- src/network/networkd-link.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 53df8f3b843..8f70d5da3af 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -409,7 +409,7 @@ void link_check_ready(Link *link) { return (void) log_link_debug(link, "%s(): link is in %s state.", __func__, link_state_to_string(link->state)); if (!link->network) - return; + return (void) log_link_debug(link, "%s(): link is unmanaged.", __func__); if (link->iftype == ARPHRD_CAN) { /* let's shortcut things for CAN which doesn't need most of checks below. */ @@ -420,6 +420,12 @@ void link_check_ready(Link *link) { return; } + if (link->set_link_messages > 0) + return (void) log_link_debug(link, "%s(): link layer is configuring.", __func__); + + if (!link->activated) + return (void) log_link_debug(link, "%s(): link is not activated.", __func__); + if (!link->static_addresses_configured) return (void) log_link_debug(link, "%s(): static addresses are not configured.", __func__); -- 2.47.3