From: Yu Watanabe Date: Fri, 21 May 2021 23:15:00 +0000 (+0900) Subject: network: IPv6LinkLocalAddressGenerationMode=none disables IPv6LL addressing X-Git-Tag: v249-rc1~168^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F19704%2Fhead;p=thirdparty%2Fsystemd.git network: IPv6LinkLocalAddressGenerationMode=none disables IPv6LL addressing --- diff --git a/man/systemd.network.xml b/man/systemd.network.xml index 61acea1a8b5..e267d4d40c6 100644 --- a/man/systemd.network.xml +++ b/man/systemd.network.xml @@ -422,11 +422,15 @@ IPv6LinkLocalAddressGenerationMode= - Specifies how IPv6 link local address is generated. Takes one of eui64, - none, stable-privacy and random. - When unset, the kernel's default will be used. Note that if LinkLocalAddressing= - not configured as ipv6 then IPv6LinkLocalAddressGenerationMode= - is ignored. + Specifies how IPv6 link local address is generated. Takes one of + eui64, none, stable-privacy and + random. When unset, the kernel's default will be used. Note that if + LinkLocalAddressing= is no or + ipv4, then IPv6LinkLocalAddressGenerationMode= will + be ignored. Also, even if LinkLocalAddressing= is yes + or ipv6, setting + IPv6LinkLocalAddressGenerationMode=none disables to configure an IPv6 + link-local address. diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index bf2c0e99d43..0fa505bcbb3 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -170,6 +170,8 @@ int network_verify(Network *network) { if (network->link_local < 0) network->link_local = network->bridge ? ADDRESS_FAMILY_NO : ADDRESS_FAMILY_IPV6; + if (network->ipv6ll_address_gen_mode == IPV6_LINK_LOCAL_ADDRESSS_GEN_MODE_NONE) + SET_FLAG(network->link_local, ADDRESS_FAMILY_IPV6, false); /* IPMasquerade implies IPForward */ network->ip_forward |= network->ip_masquerade;