From: Florian Klink Date: Wed, 23 Dec 2020 11:57:47 +0000 (+0100) Subject: network: fix IPv6PrivacyExtensions=kernel handling X-Git-Tag: v248-rc1~452^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F18069%2Fhead;p=thirdparty%2Fsystemd.git network: fix IPv6PrivacyExtensions=kernel handling When set to "kernel", systemd is not supposed to touch that sysctl. 5e0534f1c13cd50ec2b143a8b18156cd37e502f7, part of https://github.com/systemd/systemd/pull/17240 forgot to handle that case. Fixes https://github.com/systemd/systemd/issues/18003 --- diff --git a/src/network/networkd-sysctl.c b/src/network/networkd-sysctl.c index 4ffb09eb068..377fdac7223 100644 --- a/src/network/networkd-sysctl.c +++ b/src/network/networkd-sysctl.c @@ -100,6 +100,10 @@ static int link_set_ipv6_privacy_extensions(Link *link) { if (!link->network) return 0; + // this is the special "kernel" value + if (link->network->ipv6_privacy_extensions == _IPV6_PRIVACY_EXTENSIONS_INVALID) + return 0; + return sysctl_write_ip_property_int(AF_INET6, link->ifname, "use_tempaddr", (int) link->network->ipv6_privacy_extensions); }