Skip to content

Commit

Permalink
network: drop IPv6LL address when LinkLocalAddressing=no|ipv4
Browse files Browse the repository at this point in the history
C.f. disscussion in systemd#13533.

Hopefully fixes systemd#12886.
  • Loading branch information
yuwata committed Sep 17, 2019
1 parent 61cda4d commit 5539fc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/network/networkd-link.c
Original file line number Diff line number Diff line change
Expand Up @@ -2389,7 +2389,7 @@ static int link_drop_foreign_config(Link *link) {

SET_FOREACH(address, link->addresses_foreign, i) {
/* we consider IPv6LL addresses to be managed by the kernel */
if (address->family == AF_INET6 && in_addr_is_link_local(AF_INET6, &address->in_addr) == 1)
if (address->family == AF_INET6 && in_addr_is_link_local(AF_INET6, &address->in_addr) == 1 && link_ipv6ll_enabled(link))
continue;

if (link_address_is_dynamic(link, address)) {
Expand Down Expand Up @@ -2466,7 +2466,7 @@ static int link_drop_config(Link *link) {

SET_FOREACH(address, link->addresses, i) {
/* we consider IPv6LL addresses to be managed by the kernel */
if (address->family == AF_INET6 && in_addr_is_link_local(AF_INET6, &address->in_addr) == 1)
if (address->family == AF_INET6 && in_addr_is_link_local(AF_INET6, &address->in_addr) == 1 && link_ipv6ll_enabled(link))
continue;

r = address_remove(address, link, NULL);
Expand Down

0 comments on commit 5539fc0

Please sign in to comment.