From 3e96fd980db95ad6268cb5ea79dcff6aaa21e098 Mon Sep 17 00:00:00 2001 From: Molly Miller Date: Tue, 27 Jun 2023 15:18:52 +0200 Subject: nixos/network-interfaces: restrict IPv6 privacy address overrides to interface Only trigger the privacy address override for a given interface when that interface is added. Without restricting the rule to the interface, this command would be run when any interface is added. --- nixos/modules/tasks/network-interfaces.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/modules/tasks') diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index 954d7ffba71..eb1c7512d92 100644 --- a/nixos/modules/tasks/network-interfaces.nix +++ b/nixos/modules/tasks/network-interfaces.nix @@ -1496,7 +1496,7 @@ in in '' # override to ${msg} for ${i.name} - ACTION=="add", SUBSYSTEM=="net", RUN+="${pkgs.procps}/bin/sysctl net.ipv6.conf.${replaceStrings ["."] ["/"] i.name}.use_tempaddr=${val}" + ACTION=="add", SUBSYSTEM=="net", NAME=="${i.name}", RUN+="${pkgs.procps}/bin/sysctl net.ipv6.conf.${replaceStrings ["."] ["/"] i.name}.use_tempaddr=${val}" '') (filter (i: i.tempAddress != cfg.tempAddresses) interfaces); }) ] ++ lib.optional (cfg.wlanInterfaces != {}) -- cgit 1.4.1