diff --git a/firewall/firewall-add b/firewall/firewall-add index 1ba9ae1..6216256 100755 --- a/firewall/firewall-add +++ b/firewall/firewall-add @@ -357,6 +357,7 @@ COUNT_TARGET_PORT=$(set |grep TARGET_PORT |wc -l) # SOURCE AND TARGET PORTS ARE IN PAIRS if [ "$COUNT_SOURCE_PORT" == "$COUNT_TARGET_PORT" ]; then PAIRS="1"; else PAIRS="0"; +fi; if [ "$COUNT_SOURCE_IP" == 0 ] ; then COUNT_SOURCE_IP=1 ; fi for source_ip_index in $(seq 1 $COUNT_SOURCE_IP) ; do @@ -382,8 +383,14 @@ for source_ip_index in $(seq 1 $COUNT_SOURCE_IP) ; do TARGET_PORT=$(eval "echo \${"TARGET_PORT_$target_port_index"}") fi + + debug "PAIRS: $PAIRS"; + debug "source_port_index: $source_port_index"; + debug "target_port_index: $target_port_index"; + # if case of pairs if indexes doesn't match then omit routing - if [ "$PAIRS" == "1"] && [ "$source_port_index" != "$target_port_index" ] ; then + if [ "$PAIRS" == "1" ] && [ "$source_port_index" != "$target_port_index" ] ; then + debug "OMIT ROUTING"; continue; fi;