From: Yu Watanabe Date: Thu, 28 Jul 2022 07:43:26 +0000 (+0900) Subject: network: drop carrier check for unmanaged interface from link_is_ready_to_configure() X-Git-Tag: v252-rc1~505^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2fd3908b5c4d716b3eac450b2e529a08455d048e;p=thirdparty%2Fsystemd.git network: drop carrier check for unmanaged interface from link_is_ready_to_configure() Preparation for later commits. No functional change. --- diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 7a5bc624155..8d4e64769b3 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -98,12 +98,8 @@ bool link_is_ready_to_configure(Link *link, bool allow_unmanaged) { if (!IN_SET(link->state, LINK_STATE_CONFIGURING, LINK_STATE_CONFIGURED, LINK_STATE_UNMANAGED)) return false; - if (!link->network) { - if (!allow_unmanaged) - return false; - - return link_has_carrier(link); - } + if (!link->network) + return allow_unmanaged; if (!link->network->configure_without_carrier) { if (link->set_flags_messages > 0) diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c index 921b031b296..71e578d8982 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -1298,7 +1298,8 @@ static int route_is_ready_to_configure(const Route *route, Link *link) { if (r < 0) return false; if (r > 0) { - if (!link_is_ready_to_configure(l, true)) + if (!link_is_ready_to_configure(l, /* allow_unmanaged = */ true) || + !link_has_carrier(l)) return false; m->ifindex = l->ifindex;