Unverified Commit 85b83f8e authored by Kroese's avatar Kroese Committed by GitHub
Browse files

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

parent f395dfaa
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -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