Allowed multiple 'to' arguments to DNAT and SNAT.

This commit is contained in:
ktsaou 2003-01-20 22:10:56 +00:00
parent 09bb1278f8
commit 316dcdbbe4

@ -10,7 +10,7 @@
#
# config: /etc/firehol.conf
#
# $Id: firehol.sh,v 1.75 2003/01/20 21:50:36 ktsaou Exp $
# $Id: firehol.sh,v 1.76 2003/01/20 22:10:56 ktsaou Exp $
#
@ -1963,7 +1963,12 @@ rule() {
action="SNAT"
if [ "${1}" = "to" ]
then
local -a action_param=("--to-source" "${2}")
local -a action_param=
local x=
for x in ${2}
do
action_param=(${action_param[@]} "--to-source" "${x}")
done
shift 2
else
error "SNAT requires a 'to' argument."
@ -1975,7 +1980,12 @@ rule() {
action="DNAT"
if [ "${1}" = "to" ]
then
local -a action_param=("--to-destination" "${2}")
local -a action_param=
local x=
for x in ${2}
do
action_param=(${action_param[@]} "--to-destination" "${x}")
done
shift 2
else
error "DNAT requires a 'to' argument"
@ -2996,7 +3006,7 @@ case "${arg}" in
else
cat <<"EOF"
$Id: firehol.sh,v 1.75 2003/01/20 21:50:36 ktsaou Exp $
$Id: firehol.sh,v 1.76 2003/01/20 22:10:56 ktsaou Exp $
(C) Copyright 2002, Costa Tsaousis <costa@tsaousis.gr>
FireHOL is distributed under GPL.
@ -3164,7 +3174,7 @@ then
cat <<"EOF"
$Id: firehol.sh,v 1.75 2003/01/20 21:50:36 ktsaou Exp $
$Id: firehol.sh,v 1.76 2003/01/20 22:10:56 ktsaou Exp $
(C) Copyright 2002, Costa Tsaousis <costa@tsaousis.gr>
FireHOL is distributed under GPL.
Home Page: http://firehol.sourceforge.net