feat: Remove reliability on iptables multiport extension (#1140)

This commit is contained in:
Kroese
2026-05-15 17:44:35 +02:00
committed by GitHub
parent f395dfaa66
commit 85b83f8eb1
+6 -7
View File
@@ -351,7 +351,7 @@ configurePasst() {
PASST_OPTS+=" -H $VM_NET_HOST"
PASST_OPTS+=" -M $GATEWAY_MAC"
PASST_OPTS+=" -P $PASST_PID"
PASST_OPTS+=" -P $PASST_PID"
PASST_OPTS+=" -l $log"
PASST_OPTS+=" -q"
@@ -361,7 +361,10 @@ configurePasst() {
fi
PASST_OPTS=$(echo "$PASST_OPTS" | sed 's/\t/ /g' | tr -s ' ' | sed 's/^ *//')
[[ "$DEBUG" == [Yy1]* ]] && printf "Passt arguments:\n\n%s\n\n" "${PASST_OPTS// -/$'\n-'}"
if [[ "$DEBUG" == [Yy1]* || "$PASST_DEBUG" == [Yy1]* ]]; then
printf "Passt arguments:\n\n%s\n\n" "${PASST_OPTS// -/$'\n-'}"
fi
[ ! -f "$PASST" ] && cp /usr/bin/passt* /run
@@ -495,11 +498,7 @@ configureNAT() {
exclude=$(getHostPorts)
if [ -n "$exclude" ]; then
if [[ "$exclude" != *","* ]]; then
exclude=" ! --dport $exclude"
else
exclude=" -m multiport ! --dports $exclude"
fi
exclude=" ! --dport ${exclude//,/ ! --dport }"
fi
if ! iptables -t nat -A POSTROUTING -o "$VM_NET_DEV" -j MASQUERADE > /dev/null 2>&1; then