mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +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:
parent
9c5e1c24ad
commit
463797c104
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user