Added source port variable for prerouting rules creating cycle.
This commit is contained in:
@@ -31,16 +31,21 @@ for source_ip_index in $(seq 1 $COUNT_SOURCE_IP) ; do
|
||||
SOURCE_IP=$(eval "echo \${"SOURCE_IP_$source_ip_index"}")
|
||||
fi
|
||||
|
||||
for target_ip_index in $(seq 1 $COUNT_TARGET_IP) ; do
|
||||
if set |grep TARGET_IP_ ; then
|
||||
TARGET_IP=$(eval "echo \${"TARGET_IP_$target_ip_index"}")
|
||||
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_port_index in $(seq 1 $COUNT_TARGET_PORT) ; do
|
||||
if set |grep TARGET_PORT_ ; then
|
||||
TARGET_PORT=$(eval "echo \${"TARGET_PORT_$target_port_index"}")
|
||||
for target_ip_index in $(seq 1 $COUNT_TARGET_IP) ; do
|
||||
if set |grep TARGET_IP_ ; then
|
||||
TARGET_IP=$(eval "echo \${"TARGET_IP_$target_ip_index"}")
|
||||
fi
|
||||
|
||||
for target_port_index in $(seq 1 $COUNT_TARGET_PORT) ; do
|
||||
if set |grep TARGET_PORT_ ; then
|
||||
TARGET_PORT=$(eval "echo \${"TARGET_PORT_$target_port_index"}")
|
||||
fi
|
||||
|
||||
#############################
|
||||
# NSENTER Specific settings #
|
||||
if [[ "$NSENTER" == "true" ]] ; then
|
||||
@@ -104,8 +109,9 @@ else
|
||||
|
||||
fi
|
||||
|
||||
done # target_port
|
||||
done # target_ip
|
||||
done # target_port
|
||||
done # target_ip
|
||||
done # source_port
|
||||
done # source_ip
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user