From bcc3393b7f31aea04aec3103035982d382e7a202 Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 6 Jul 2026 19:21:48 +0200 Subject: [PATCH] fix: Shutdown Passt after DNS failure (#1214) --- src/network.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/network.sh b/src/network.sh index c111e7a..d224525 100644 --- a/src/network.sh +++ b/src/network.sh @@ -623,7 +623,6 @@ configurePasst() { [ -n "$IP" ] && ip="$IP" ip=$(guestIP "$ip" 2) - local gateway="${ip%.*}.1" # passt configuration: @@ -704,7 +703,11 @@ configurePasst() { NET_OPTS="-netdev stream,id=hostnet0,server=off,addr.type=unix,addr.path=$PASST_SOCKET" - configureDNS "lo" "$ip" "$MAC" "$HOST" "$MASK" "$gateway" || return 1 + if ! configureDNS "lo" "$ip" "$MAC" "$HOST" "$MASK" "$gateway"; then + mKill "$PASST_PID" + rm -f "$PASST_PID" "$PASST_SOCKET" + return 1 + fi IP="$ip" return 0