syntax fix

This commit is contained in:
2023-05-15 07:04:11 +00:00
parent 18c275bf73
commit 92f34fb9e2

View File

@@ -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
debug "OMIT ROUTING";
continue;
fi;