From 483e44684de2fba01f219dca5ca6e913eba07f88 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Fri, 25 Oct 2024 18:10:55 +0200 Subject: [PATCH] dhcpcd: fix permissions error with secondary IPv4 addresses If dhcpcd receives a secondary IPv4 address from the DHCP server it tries to enable automatic promotion from secondary to primary by writing `1` to /proc/sys/net/ipv4/conf/%s/promote_secondaries. --- nixos/modules/services/networking/dhcpcd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix index a7c896cb28a2..059dc59e8a0a 100644 --- a/nixos/modules/services/networking/dhcpcd.nix +++ b/nixos/modules/services/networking/dhcpcd.nix @@ -249,7 +249,7 @@ in ExecReload = "${dhcpcd}/sbin/dhcpcd --rebind"; Restart = "always"; AmbientCapabilities = [ "CAP_NET_ADMIN" "CAP_NET_RAW" "CAP_NET_BIND_SERVICE" ]; - ReadWritePaths = [ "/proc/sys/net/ipv6" ] + ReadWritePaths = [ "/proc/sys/net/ipv4" "/proc/sys/net/ipv6" ] ++ lib.optionals useResolvConf ([ "/run/resolvconf" ] ++ config.networking.resolvconf.subscriberFiles); DeviceAllow = ""; LockPersonality = true;