mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2026-08-28 20:06:05 +00:00
feat: Remove reliability on iptables multiport extension (#1140)
This commit is contained in:
+6
-7
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user