(!link->network->ipv6_accept_ra_use_autonomous_prefix ||
link_check_addresses_ready(link, NETWORK_CONFIG_SOURCE_NDISC));
+ /* If the uplink for PD is self, then request the corresponding DHCP protocol is also ready. */
+ if (dhcp_pd_is_uplink(link, link, /* accept_auto = */ false)) {
+ if (link_dhcp4_enabled(link) && link->network->dhcp_use_6rd &&
+ link->dhcp_lease && dhcp4_lease_has_pd_prefix(link->dhcp_lease)) {
+ if (!dhcp4_ready)
+ return (void) log_link_debug(link, "%s(): DHCPv4 6rd prefix is assigned, but DHCPv4 protocol is not finished yet.", __func__);
+ if (!dhcp_pd_ready)
+ return (void) log_link_debug(link, "%s(): DHCPv4 is finished, but prefix acquired by DHCPv4-6rd is not assigned yet.", __func__);
+ }
+
+ if (link_dhcp6_enabled(link) && link->network->dhcp6_use_pd_prefix &&
+ link->dhcp6_lease && dhcp6_lease_has_pd_prefix(link->dhcp6_lease)) {
+ if (!dhcp6_ready)
+ return (void) log_link_debug(link, "%s(): DHCPv6 IA_PD prefix is assigned, but DHCPv6 protocol is not finished yet.", __func__);
+ if (!dhcp_pd_ready)
+ return (void) log_link_debug(link, "%s(): DHCPv6 is finished, but prefix acquired by DHCPv6 IA_PD is not assigned yet.", __func__);
+ }
+ }
+
/* At least one dynamic addressing protocol is finished. */
if (!ipv4ll_ready && !dhcp4_ready && !dhcp6_ready && !dhcp_pd_ready && !ndisc_ready)
return (void) log_link_debug(link, "%s(): dynamic addressing protocols are enabled but none of them finished yet.", __func__);