diff --git a/hole-punching-tests/Dockerfile b/hole-punching-tests/Dockerfile index 0fbf0e2f3a3..ed6f157ffd4 100644 --- a/hole-punching-tests/Dockerfile +++ b/hole-punching-tests/Dockerfile @@ -15,10 +15,5 @@ RUN --mount=type=cache,target=./target \ mv ./target/x86_64-unknown-linux-musl/release/hole-punching-tests /usr/local/bin/hole-punching-tests FROM alpine:3 - -ARG DEBIAN_FRONTEND=noninteractive -RUN --mount=type=cache,target=/var/cache/apk apk add nftables - COPY --from=builder /usr/local/bin/hole-punching-tests /usr/bin/hole-punching-tests - ENV RUST_BACKTRACE=1 diff --git a/hole-punching-tests/router/Dockerfile b/hole-punching-tests/router/Dockerfile index 883880e5808..aaf61fdab7f 100644 --- a/hole-punching-tests/router/Dockerfile +++ b/hole-punching-tests/router/Dockerfile @@ -1,13 +1,9 @@ -FROM ubuntu:jammy +FROM debian:12-slim ARG DEBIAN_FRONTEND=noninteractive -RUN --mount=type=cache,target=/var/cache/apt apt-get update && apt-get -y install iproute2 nftables ulogd2 jq - -# Debugging tools -RUN --mount=type=cache,target=/var/cache/apt apt-get update && apt-get -y install tcpdump iputils-ping +RUN --mount=type=cache,target=/var/cache/apt apt-get update && apt-get -y install iproute2 nftables jq tcpdump COPY *.sh /scripts/ RUN chmod +x /scripts/*.sh -COPY ulogd.conf /etc/ulogd.conf ENTRYPOINT ["./scripts/run.sh"] diff --git a/hole-punching-tests/router/run.sh b/hole-punching-tests/router/run.sh index 29c8813bab6..d25c6610803 100644 --- a/hole-punching-tests/router/run.sh +++ b/hole-punching-tests/router/run.sh @@ -1,6 +1,6 @@ #!/bin/sh -set -ex +set -e ADDR_EXTERNAL=$(ip -json addr show eth1 | jq '.[0].addr_info[0].local' -r) SUBNET_INTERNAL=$(ip -json addr show eth0 | jq '.[0].addr_info[0].local + "/" + (.[0].addr_info[0].prefixlen | tostring)' -r) @@ -11,6 +11,4 @@ nft add rule ip nat postrouting ip saddr $SUBNET_INTERNAL oifname "eth1" snat $A tc qdisc add dev eth1 root netem delay 50ms -tcpdump -i eth0 -n -w /dump.pcap & - -ulogd +tcpdump -i eth1 diff --git a/hole-punching-tests/router/ulogd.conf b/hole-punching-tests/router/ulogd.conf deleted file mode 100644 index c5cac4ceb84..00000000000 --- a/hole-punching-tests/router/ulogd.conf +++ /dev/null @@ -1,12 +0,0 @@ -[global] - -logfile="/var/log/ulogd.log" - -stack=log1:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU - -[log1] -group=1 - -[emu1] -file="/var/log/ulogd_syslogemu.log" -sync=1