diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-12-13 12:14:06 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-12-14 10:32:56 +0100 |
commit | 372e8592c6e3a891174344be0899a91769ef61af (patch) | |
tree | 0d1466762701509fa4d68c2cabee13aaf21f833f /src/network/wait-online | |
parent | shell-completion: Add completion for systemd-analyze critical-chain (diff) | |
download | systemd-372e8592c6e3a891174344be0899a91769ef61af.tar.xz systemd-372e8592c6e3a891174344be0899a91769ef61af.zip |
wait-online: also use address state even when operational state is below degraded
Closes #21706.
Diffstat (limited to 'src/network/wait-online')
-rw-r--r-- | src/network/wait-online/manager.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/network/wait-online/manager.c b/src/network/wait-online/manager.c index e1df0345c0..3890e92b61 100644 --- a/src/network/wait-online/manager.c +++ b/src/network/wait-online/manager.c @@ -71,7 +71,7 @@ static int manager_link_is_online(Manager *m, Link *l, LinkOperationalStateRange needs_ipv4 = required_family & ADDRESS_FAMILY_IPV4; needs_ipv6 = required_family & ADDRESS_FAMILY_IPV6; - if (s.min >= LINK_OPERSTATE_DEGRADED) { + if (s.min < LINK_OPERSTATE_ROUTABLE) { 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; @@ -81,9 +81,7 @@ static int manager_link_is_online(Manager *m, Link *l, LinkOperationalStateRange log_link_debug(l, "No routable or link-local IPv6 address is configured."); return 0; } - } - - if (s.min >= LINK_OPERSTATE_ROUTABLE) { + } else { if (needs_ipv4 && l->ipv4_address_state < LINK_ADDRESS_STATE_ROUTABLE) { log_link_debug(l, "No routable IPv4 address is configured."); return 0; |