1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00

network: do not drop IPv6LL address in link_drop_addresses()

This commit is contained in:
Yu Watanabe 2021-09-08 16:18:52 +09:00
parent 981fab5d0a
commit ecedc48b19

View File

@ -882,7 +882,7 @@ int link_drop_foreign_addresses(Link *link) {
SET_FOREACH(address, link->addresses_foreign) { SET_FOREACH(address, link->addresses_foreign) {
/* We consider IPv6LL addresses to be managed by the kernel, or dropped in link_drop_ipv6ll_addresses() */ /* 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) == 1) if (address->family == AF_INET6 && in6_addr_is_link_local(&address->in_addr.in6))
continue; continue;
if (link_address_is_dynamic(link, address)) { if (link_address_is_dynamic(link, address)) {
@ -915,8 +915,8 @@ int link_drop_addresses(Link *link) {
assert(link); assert(link);
SET_FOREACH(address, link->addresses) { SET_FOREACH(address, link->addresses) {
/* we consider IPv6LL addresses to be managed by the kernel */ /* 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) == 1 && link_ipv6ll_enabled(link)) if (address->family == AF_INET6 && in6_addr_is_link_local(&address->in_addr.in6))
continue; continue;
k = address_remove(address, link); k = address_remove(address, link);