network/dhcp6: skip to check existence of DHCPv6 address when UseAddress=no

Follow-up for 1536b7b2d0 and
5f950e5621.

Fixes #29979.
This commit is contained in:
Yu Watanabe
2023-11-11 02:30:20 +09:00
parent f5e1781a9e
commit fc4aa64c2d

View File

@@ -99,13 +99,15 @@ int dhcp6_check_ready(Link *link) {
int r;
assert(link);
assert(link->network);
if (link->dhcp6_messages > 0) {
log_link_debug(link, "%s(): DHCPv6 addresses and routes are not set.", __func__);
return 0;
}
if (!link_check_addresses_ready(link, NETWORK_CONFIG_SOURCE_DHCP6)) {
if (link->network->dhcp6_use_address &&
!link_check_addresses_ready(link, NETWORK_CONFIG_SOURCE_DHCP6)) {
Address *address;
SET_FOREACH(address, link->addresses)