summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-12-12 02:26:22 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-12-16 22:43:18 +0900
commit9e86dba94b4e6d13f2bd621f2017c5b0628800f7 (patch)
tree5d395d2c9d0957d15e11987129c053113d583364 /src
parent97b6ed3295e4f9814413fb7982a95eed5ac49a03 (diff)
downloadsystemd-9e86dba94b4e6d13f2bd621f2017c5b0628800f7.tar.gz
network: drop IPv6LL addresses manually configured in .network file
Diffstat (limited to 'src')
-rw-r--r--src/network/networkd-address.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index 7cd4d27c07..c4a666a908 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -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);