1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-03 01:17:45 +03:00

network: dhcp6pd: do not check Announce= setting when the link does not support RADV

This commit is contained in:
Yu Watanabe 2021-12-06 01:28:43 +09:00
parent 57c107544d
commit 2747f1321d

View File

@ -534,7 +534,7 @@ static int dhcp6_pd_assign_prefix(
(void) in6_addr_prefix_to_string(&prefix, 64, &buf);
if (link->network->dhcp6_pd_announce) {
if (link_radv_enabled(link) && link->network->dhcp6_pd_announce) {
r = radv_add_prefix(link, &prefix, 64, lifetime_preferred_usec, lifetime_valid_usec);
if (r < 0)
return log_link_warning_errno(link, r,
@ -571,7 +571,7 @@ static int dhcp6_pd_prepare(Link *link) {
if (!link_dhcp6_pd_is_enabled(link))
return 0;
if (link->network->dhcp6_pd_announce && !link->radv)
if (link_radv_enabled(link) && link->network->dhcp6_pd_announce && !link->radv)
return 0;
link_mark_addresses(link, NETWORK_CONFIG_SOURCE_DHCP6PD, NULL);