<listitem><para>Waiting for an IPv4 address of each network interface to be configured. If this
option is specified with <option>--any</option>, then
<command>systemd-networkd-wait-online</command> exits with success when at least one interface
- becomes online and has an IPv4 address. The option is applied only for the operational state
- <literal>degraded</literal> or above. If neither <option>--ipv4</option> nor
+ becomes online and has an IPv4 address. If the required minimum operational state is
+ below <literal>routable</literal>, then each link (or at least one link with
+ <option>--any</option>) must have an IPv4 link-local or routable address. If the required
+ minimum operational state is <literal>routable</literal>, then each link must have an IPv4
+ routable address.</para>
+ <para>If neither <option>--ipv4</option> nor
<option>--ipv6</option> is specified, then the value from
<varname>RequiredFamilyForOnline=</varname> in the corresponding <filename>.network</filename>
file is used if present.</para></listitem>
<listitem><para>Waiting for an IPv6 address of each network interface to be configured. If this
option is specified with <option>--any</option>, then
<command>systemd-networkd-wait-online</command> exits with success when at least one interface
- becomes online and has an IPv6 address. The option is applied only for the operational state
- <literal>degraded</literal> or above. If neither <option>--ipv4</option> nor
+ becomes online and has an IPv6 address. If the required minimum operational state is
+ below <literal>routable</literal>, then each link (or at least one link with
+ <option>--any</option>) must have an IPv6 link-local or routable address. If the required
+ minimum operational state is <literal>routable</literal>, then each link must have an IPv6
+ routable address.</para>
+ <para>If neither <option>--ipv4</option> nor
<option>--ipv6</option> is specified, then the value from
<varname>RequiredFamilyForOnline=</varname> in the corresponding <filename>.network</filename>
file is used if present.</para></listitem>
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;
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;