diff options
author | Luca Boccassi <luca.boccassi@microsoft.com> | 2021-04-14 21:17:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-14 21:17:00 +0100 |
commit | 9264fb47d9f0841c9fea832fb93d85247bcd8957 (patch) | |
tree | 554ab2e8dab80cff6d28b5915d0d114507b6cbc2 /src/network/wait-online | |
parent | c5cb37d95e0f0bb093019b56e160d59cdfd66c63 (diff) | |
parent | f11bee0cb928c4308ab6baebc036644fb73c965b (diff) | |
download | systemd-9264fb47d9f0841c9fea832fb93d85247bcd8957.tar.gz |
Merge pull request #19315 from yuwata/network-wait-online-address-family-follow-ups
network: several follow-ups for #19069
Diffstat (limited to 'src/network/wait-online')
-rw-r--r-- | src/network/wait-online/manager.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/network/wait-online/manager.c b/src/network/wait-online/manager.c index 8238b70464..e1df0345c0 100644 --- a/src/network/wait-online/manager.c +++ b/src/network/wait-online/manager.c @@ -72,30 +72,30 @@ static int manager_link_is_online(Manager *m, Link *l, LinkOperationalStateRange needs_ipv6 = required_family & ADDRESS_FAMILY_IPV6; if (s.min >= LINK_OPERSTATE_DEGRADED) { - if (needs_ipv4 && l->ipv4_address_state < LINK_ADDRESS_STATE_DEGRADED) - goto ipv4_not_ready; + if (needs_ipv4 && l->ipv4_address_state < LINK_ADDRESS_STATE_DEGRADED) { + log_link_debug(l, "No routable or link-local IPv4 address is configured."); + return 0; + } - if (needs_ipv6 && l->ipv6_address_state < LINK_ADDRESS_STATE_DEGRADED) - goto ipv6_not_ready; + if (needs_ipv6 && l->ipv6_address_state < LINK_ADDRESS_STATE_DEGRADED) { + log_link_debug(l, "No routable or link-local IPv6 address is configured."); + return 0; + } } if (s.min >= LINK_OPERSTATE_ROUTABLE) { - if (needs_ipv4 && l->ipv4_address_state < LINK_ADDRESS_STATE_ROUTABLE) - goto ipv4_not_ready; + if (needs_ipv4 && l->ipv4_address_state < LINK_ADDRESS_STATE_ROUTABLE) { + log_link_debug(l, "No routable IPv4 address is configured."); + return 0; + } - if (needs_ipv6 && l->ipv6_address_state < LINK_ADDRESS_STATE_ROUTABLE) - goto ipv6_not_ready; + if (needs_ipv6 && l->ipv6_address_state < LINK_ADDRESS_STATE_ROUTABLE) { + log_link_debug(l, "No routable IPv6 address is configured."); + return 0; + } } return 1; - -ipv4_not_ready: - log_link_debug(l, "No routable or link-local IPv4 address is configured."); - return 0; - -ipv6_not_ready: - log_link_debug(l, "No routable or link-local IPv6 address is configured."); - return 0; } bool manager_configured(Manager *m) { |