Skip to content

Commit

Permalink
network: fix IPv6PrivacyExtensions=kernel handling
Browse files Browse the repository at this point in the history
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

(cherry picked from commit d3ccb1b)
  • Loading branch information
flokli authored and keszybz committed Feb 2, 2021
1 parent 2ba904a commit 242fc1d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/network/networkd-sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 242fc1d

Please sign in to comment.