From 88814bf553440f0671f17be7300db642adeb7b49 Mon Sep 17 00:00:00 2001 From: bbruns Date: Sun, 26 Sep 2010 21:47:05 +0000 Subject: [PATCH] Fixes for multiport --- bin/firewall-sosdg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/firewall-sosdg b/bin/firewall-sosdg index 1973cfe..3e49b86 100755 --- a/bin/firewall-sosdg +++ b/bin/firewall-sosdg @@ -263,13 +263,13 @@ if [ "$TCPPORTS" ] || [ "$UDPPORTS" ]; then display_c YELLOW "Adding allowed port: " N if [ "$TCPPORTS" ]; then if [ $IPTABLES_MULTIPORT == "yes" ] && [ $NF_MULTIPORT_MAX_PORTS ]; then - TCPPORTS_ARRAY=($TCPPORTS) + TCPPORTS=($TCPPORTS) PORTS_COUNT=${#TCPPORTS[@]} PORTS_COUNT_CURR=0 while [ $PORTS_COUNT_CURR -lt $PORTS_COUNT ]; do for ((y=$PORTS_COUNT_CURR; y <=(($PORTS_COUNT_CURR+((MULTI_MAX_PORTS-1)))); y++)); do - if [ ${TCPPORTS_ARRAY[$y]} ]; then - PORTS="${PORTS},${TCPPORTS_ARRAY[$y]}" + if [ ${TCPPORTS[$y]} ]; then + PORTS="${PORTS},${TCPPORTS[$y]}" fi done echo -en "${PURPLE}Multiport-TCP${DEFAULT_COLOR}/${GREEN}${PORTS#,}"