From edd7f7c6e180cbb2bcee4b61586a4a4e199e48b7 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Tue, 18 Jan 2022 20:56:42 +0000 Subject: [PATCH 1/3] libreswan: 4.5 -> 4.6 --- pkgs/tools/networking/libreswan/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/libreswan/default.nix b/pkgs/tools/networking/libreswan/default.nix index 766a1030fd7e..d384fbf680a0 100644 --- a/pkgs/tools/networking/libreswan/default.nix +++ b/pkgs/tools/networking/libreswan/default.nix @@ -42,11 +42,11 @@ in stdenv.mkDerivation rec { pname = "libreswan"; - version = "4.5"; + version = "4.6"; src = fetchurl { url = "https://download.libreswan.org/${pname}-${version}.tar.gz"; - sha256 = "18whvmaxqfmaqbmq72calyzk21wyvxa0idddcsxd8x36vhdza0q7"; + sha256 = "1zsnsfx18pf5dy1p4jva2sfl0bdfx5y9ls54f9bp70m64r46yf96"; }; strictDeps = true; From 741a585052c99be0bf2633c6195be57a464b962e Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 19 Jan 2022 11:43:01 +0100 Subject: [PATCH 2/3] nixos/tests/libreswan: fixup 739c51ae4ef --- nixos/tests/libreswan.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/tests/libreswan.nix b/nixos/tests/libreswan.nix index 56ab908aed9a..ff3d2344a679 100644 --- a/nixos/tests/libreswan.nix +++ b/nixos/tests/libreswan.nix @@ -89,7 +89,7 @@ in """ Sends a message as Alice to Bob """ - bob.execute("nc -lu ::0 1234 >/tmp/msg >&2 &") + bob.execute("nc -lu ::0 1234 >/tmp/msg &") alice.sleep(1) alice.succeed(f"echo '{msg}' | nc -uw 0 bob 1234") bob.succeed(f"grep '{msg}' /tmp/msg") @@ -100,7 +100,7 @@ in Starts eavesdropping on Alice and Bob """ match = "src host alice and dst host bob" - eve.execute(f"tcpdump -i br0 -c 1 -Avv {match} >/tmp/log >&2 &") + eve.execute(f"tcpdump -i br0 -c 1 -Avv {match} >/tmp/log &") start_all() From 4db154ca619c8da8655e79faabb38c13ff2ad053 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 19 Jan 2022 11:44:58 +0100 Subject: [PATCH 3/3] libreswan: fix more binary paths --- pkgs/tools/networking/libreswan/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/libreswan/default.nix b/pkgs/tools/networking/libreswan/default.nix index d384fbf680a0..6062b1ecfff5 100644 --- a/pkgs/tools/networking/libreswan/default.nix +++ b/pkgs/tools/networking/libreswan/default.nix @@ -70,11 +70,14 @@ stdenv.mkDerivation rec { ] ++ lib.optional stdenv.isLinux libselinux; prePatch = '' - # Correct iproute2 path - sed -e 's|"/sbin/ip"|"${iproute2}/bin/ip"|' \ - -e 's|"/sbin/iptables"|"${iptables}/bin/iptables"|' \ + # Correct iproute2 and iptables path + sed -e 's|/sbin/ip|${iproute2}/bin/ip|' \ + -e 's|/sbin/\(ip6\?tables\)|${iptables}/bin/\1|' \ -i initsystems/systemd/ipsec.service.in \ + programs/barf/barf.in \ programs/verify/verify.in + sed -e 's|\([[:blank:]]\)\(ip6\?tables\(-save\)\? -\)|\1${iptables}/bin/\2|' \ + -i programs/verify/verify.in # Prevent the makefile from trying to # reload the systemd daemon or create tmpfiles