Merge pull request #155535 from risicle/ris-libreswan-4.6

libreswan: 4.5 -> 4.6
This commit is contained in:
Michele Guerini Rocco 2022-01-19 22:42:49 +01:00 committed by GitHub
commit 2da332aa2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 7 deletions

View file

@ -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()

View file

@ -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;
@ -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