Added source port variable for prerouting rules creating cycle.

This commit is contained in:
2021-12-12 20:51:55 +00:00
parent 0f8df0c749
commit ff3ae4b6a8

View File

@@ -31,6 +31,11 @@ for source_ip_index in $(seq 1 $COUNT_SOURCE_IP) ; do
SOURCE_IP=$(eval "echo \${"SOURCE_IP_$source_ip_index"}") SOURCE_IP=$(eval "echo \${"SOURCE_IP_$source_ip_index"}")
fi fi
for source_port_index in $(seq 1 $COUNT_SOURCE_PORT) ; do
if set |grep SOURCE_PORT_ ; then
SOURCE_PORT=$(eval "echo \${"SOURCE_PORT_$source_port_index"}")
fi
for target_ip_index in $(seq 1 $COUNT_TARGET_IP) ; do for target_ip_index in $(seq 1 $COUNT_TARGET_IP) ; do
if set |grep TARGET_IP_ ; then if set |grep TARGET_IP_ ; then
TARGET_IP=$(eval "echo \${"TARGET_IP_$target_ip_index"}") TARGET_IP=$(eval "echo \${"TARGET_IP_$target_ip_index"}")
@@ -106,6 +111,7 @@ fi
done # target_port done # target_port
done # target_ip done # target_ip
done # source_port
done # source_ip done # source_ip