1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 06:25:37 +03:00

network: skip to check dynamic addresses when ConfigureWithoutCarrier=yes

Otherwise, the interface cannot be in "configured" state, as ipv6 link local
addressing is enabled by default. Note that even if ConfigureWithoutCarrier=
is set, all dynamic configurations are checked when the interface has
carrier.
This commit is contained in:
Yu Watanabe 2019-06-14 05:16:11 +09:00
parent 9c5e1c24ad
commit 463797c104

View File

@ -960,23 +960,26 @@ void link_check_ready(Link *link) {
if (!link->routing_policy_rules_configured)
return;
if (link_ipv4ll_enabled(link, ADDRESS_FAMILY_IPV4) && !(link->ipv4ll_address && link->ipv4ll_route))
return;
if (link_has_carrier(link) || !link->network->configure_without_carrier) {
if (link_ipv6ll_enabled(link) &&
in_addr_is_null(AF_INET6, (const union in_addr_union*) &link->ipv6ll_address))
return;
if (link_ipv4ll_enabled(link, ADDRESS_FAMILY_IPV4) && !(link->ipv4ll_address && link->ipv4ll_route))
return;
if ((link_dhcp4_enabled(link) || link_dhcp6_enabled(link)) &&
!link->dhcp4_configured &&
!link->dhcp6_configured &&
!(link_ipv4ll_enabled(link, ADDRESS_FAMILY_FALLBACK_IPV4) && link->ipv4ll_address && link->ipv4ll_route))
/* When DHCP is enabled, at least one protocol must provide an address, or
* an IPv4ll fallback address must be configured. */
return;
if (link_ipv6ll_enabled(link) &&
in_addr_is_null(AF_INET6, (const union in_addr_union*) &link->ipv6ll_address))
return;
if (link_ipv6_accept_ra_enabled(link) && !link->ndisc_configured)
return;
if ((link_dhcp4_enabled(link) || link_dhcp6_enabled(link)) &&
!link->dhcp4_configured &&
!link->dhcp6_configured &&
!(link_ipv4ll_enabled(link, ADDRESS_FAMILY_FALLBACK_IPV4) && link->ipv4ll_address && link->ipv4ll_route))
/* When DHCP is enabled, at least one protocol must provide an address, or
* an IPv4ll fallback address must be configured. */
return;
if (link_ipv6_accept_ra_enabled(link) && !link->ndisc_configured)
return;
}
if (link->state != LINK_STATE_CONFIGURED)
link_enter_configured(link);