From 58ac5fd852a61571a393f521379d7fe29cfc959a Mon Sep 17 00:00:00 2001 From: teastep Date: Thu, 22 Jan 2004 16:59:40 +0000 Subject: [PATCH] Correct messages generated out of setup_masq() git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1087 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/firewall | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Shorewall/firewall b/Shorewall/firewall index 643829b38..3c28f11e0 100755 --- a/Shorewall/firewall +++ b/Shorewall/firewall @@ -3872,26 +3872,28 @@ setup_masq() if [ -n "$subnet" ]; then for s in $subnet; do - for destnet in $(separate_list $destnets); do - if [ -n "$addresses" ]; then + if [ -n "$addresses" ]; then + for destnet in $(separate_list $destnets); do addnatrule $chain -s $s -d $destnet -j SNAT $temp - echo " To $destination from $s through ${interface} using $addresses" - else + done + echo " To $destination from $s through ${interface} using $addresses" + else + for destnet in $(separate_list $destnets); do addnatrule $chain -s $s -d $destnet -j MASQUERADE - echo " To $destination from $s through ${interface}" - fi - done + done + echo " To $destination from $s through ${interface}" + fi done elif [ -n "$address" ]; then for destnet in $(separate_list $destnets); do addnatrule $chain -d $destnet -j SNAT $temp - echo " To $destination from $source through ${interface} using $addresses" done + echo " To $destination from $source through ${interface} using $addresses" else for destnet in $(separate_list $destnets); do addnatrule $chain -d $destnet -j MASQUERADE - echo " To $destination from $source through ${interface}" done + echo " To $destination from $source through ${interface}" fi }