Skip to content

Commit d3ccb1b

Browse files
flokliyuwata
authored andcommitted
network: fix IPv6PrivacyExtensions=kernel handling
When set to "kernel", systemd is not supposed to touch that sysctl. 5e0534f, part of systemd/systemd#17240 forgot to handle that case. Fixes systemd/systemd#18003
1 parent 7eeaf72 commit d3ccb1b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/network/networkd-sysctl.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ static int link_set_ipv6_privacy_extensions(Link *link) {
100100
if (!link->network)
101101
return 0;
102102

103+
// this is the special "kernel" value
104+
if (link->network->ipv6_privacy_extensions == _IPV6_PRIVACY_EXTENSIONS_INVALID)
105+
return 0;
106+
103107
return sysctl_write_ip_property_int(AF_INET6, link->ifname, "use_tempaddr", (int) link->network->ipv6_privacy_extensions);
104108
}
105109

0 commit comments

Comments
 (0)