DHCPv6 requires an IPv6 link-local address to work. The client will not be started (even when enabled explicitly with `DHCP=`) if none is configured (either by autoconfiguration or manually). Therefore, disable IPv6 in such case.
if (!socket_ipv6_is_supported())
return false;
- return link_dhcp6_enabled(link) || link_ipv6ll_enabled(link) || network_has_static_ipv6_addresses(link->network);
+ /* DHCPv6 client will not be started if no IPv6 link-local address is configured. */
+ return link_ipv6ll_enabled(link) || network_has_static_ipv6_addresses(link->network);
}
static bool link_lldp_rx_enabled(Link *link) {
return log_link_error_errno(link, r, "Could not set MAC address: %m");
}
- /* If IPv6 not configured (no static IPv6 address and neither DHCPv6 nor IPv6LL is enabled)
+ /* If IPv6 not configured (no static IPv6 address and IPv6LL autoconfiguration is disabled)
for this interface then disable IPv6 else enable it. */
(void) link_enable_ipv6(link);