1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-26 14:04:03 +03:00

network: drop IPv6LL addresses manually configured in .network file

This commit is contained in:
Yu Watanabe 2021-12-12 02:26:22 +09:00
parent 97b6ed3295
commit 9e86dba94b

View File

@ -895,8 +895,11 @@ int link_drop_addresses(Link *link) {
if (!address_exists(address))
continue;
/* We consider IPv6LL addresses to be managed by the kernel, or dropped in link_drop_ipv6ll_addresses() */
if (address->family == AF_INET6 && in6_addr_is_link_local(&address->in_addr.in6))
/* Do not drop IPv6LL addresses assigned by the kernel here. They will be dropped in
* link_drop_ipv6ll_addresses() if IPv6LL addressing is disabled. */
if (address->source == NETWORK_CONFIG_SOURCE_FOREIGN &&
address->family == AF_INET6 &&
in6_addr_is_link_local(&address->in_addr.in6))
continue;
k = address_remove(address);