summary refs log tree commit diff
path: root/nixos/modules/services/networking/tcpcrypt.nix
diff options
context:
space:
mode:
authorMatthew Justin Bauer <mjbauer95@gmail.com>2018-04-21 14:53:23 -0500
committerGitHub <noreply@github.com>2018-04-21 14:53:23 -0500
commit1eea73eaa8185bd6f4fe2a0facc90652277ea399 (patch)
treefa5e6aaccbdf1ef9f4e71d0f74225252a5c2168c /nixos/modules/services/networking/tcpcrypt.nix
parente70d293b6b5f236d69d559ccccdafba19c6d29c3 (diff)
parent17b73ff90cf9f7631e543d880540441bdf56d719 (diff)
downloadnixlib-1eea73eaa8185bd6f4fe2a0facc90652277ea399.tar
nixlib-1eea73eaa8185bd6f4fe2a0facc90652277ea399.tar.gz
nixlib-1eea73eaa8185bd6f4fe2a0facc90652277ea399.tar.bz2
nixlib-1eea73eaa8185bd6f4fe2a0facc90652277ea399.tar.lz
nixlib-1eea73eaa8185bd6f4fe2a0facc90652277ea399.tar.xz
nixlib-1eea73eaa8185bd6f4fe2a0facc90652277ea399.tar.zst
nixlib-1eea73eaa8185bd6f4fe2a0facc90652277ea399.zip
Merge branch 'master' into feat/acme/delay
Diffstat (limited to 'nixos/modules/services/networking/tcpcrypt.nix')
-rw-r--r--nixos/modules/services/networking/tcpcrypt.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/nixos/modules/services/networking/tcpcrypt.nix b/nixos/modules/services/networking/tcpcrypt.nix
index 2f304165eb4b..ee005e11aa32 100644
--- a/nixos/modules/services/networking/tcpcrypt.nix
+++ b/nixos/modules/services/networking/tcpcrypt.nix
@@ -44,9 +44,9 @@ in
       path = [ pkgs.iptables pkgs.tcpcrypt pkgs.procps ];
 
       preStart = ''
-        mkdir -p /var/run/tcpcryptd
-        chown tcpcryptd /var/run/tcpcryptd
-        sysctl -n net.ipv4.tcp_ecn >/run/pre-tcpcrypt-ecn-state
+        mkdir -p /run/tcpcryptd
+        chown tcpcryptd /run/tcpcryptd
+        sysctl -n net.ipv4.tcp_ecn > /run/tcpcryptd/pre-tcpcrypt-ecn-state
         sysctl -w net.ipv4.tcp_ecn=0
 
         iptables -t raw -N nixos-tcpcrypt
@@ -61,8 +61,8 @@ in
       script = "tcpcryptd -x 0x10";
 
       postStop = ''
-        if [ -f /run/pre-tcpcrypt-ecn-state ]; then
-          sysctl -w net.ipv4.tcp_ecn=$(cat /run/pre-tcpcrypt-ecn-state)
+        if [ -f /run/tcpcryptd/pre-tcpcrypt-ecn-state ]; then
+          sysctl -w net.ipv4.tcp_ecn=$(cat /run/tcpcryptd/pre-tcpcrypt-ecn-state)
         fi
 
         iptables -t mangle -D POSTROUTING -j nixos-tcpcrypt || true