fix: Shutdown Passt after DNS failure (#1214)

This commit is contained in:
Kroese
2026-07-06 19:21:48 +02:00
committed by GitHub
parent 45c0f91d6e
commit bcc3393b7f
+5 -2
View File
@@ -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