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
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);
}