mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-24 15:18:53 +01:00
Fix syntax error in setup_nat()
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1486 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
15eb297ff9
commit
0ca314fa36
@ -27,3 +27,7 @@ Changes since 2.0.3
|
|||||||
|
|
||||||
nat
|
nat
|
||||||
firewall
|
firewall
|
||||||
|
|
||||||
|
9) Fix syntax error in setup_nat()
|
||||||
|
|
||||||
|
firewall
|
||||||
|
@ -1876,7 +1876,7 @@ delete_proxy_arp() {
|
|||||||
# Setup Static Network Address Translation (NAT)
|
# Setup Static Network Address Translation (NAT)
|
||||||
#
|
#
|
||||||
setup_nat() {
|
setup_nat() {
|
||||||
local external, interface, internal, allints, localnat
|
local external= interface= internal= allints= localnat=
|
||||||
|
|
||||||
do_one_nat() {
|
do_one_nat() {
|
||||||
local add_ip_aliases=$ADD_IP_ALIASES, iface=${interface%:*}
|
local add_ip_aliases=$ADD_IP_ALIASES, iface=${interface%:*}
|
||||||
@ -2781,9 +2781,47 @@ process_action() # $1 = action
|
|||||||
createactionchain() # $1 = chain name
|
createactionchain() # $1 = chain name
|
||||||
{
|
{
|
||||||
createchain $1 no
|
createchain $1 no
|
||||||
|
CHAIN=$1
|
||||||
|
run_user_exit $CHAIN
|
||||||
|
}
|
||||||
|
|
||||||
|
createlogactionchain() # $1 = Action Name, $2 = Log Level
|
||||||
|
{
|
||||||
|
local actchain=
|
||||||
|
|
||||||
|
eval actchain=\$${1}_actchain
|
||||||
|
|
||||||
|
[ -n "$actchain" ] || actchain=1
|
||||||
|
|
||||||
|
CHAIN=${1}${actchain}
|
||||||
|
|
||||||
|
eval ${1}_actchain=$(($actchain + 1))
|
||||||
|
|
||||||
|
createchain $CHAIN
|
||||||
run_user_exit $1
|
run_user_exit $1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
find_logactionchain() # $1 = Action Name, $2 = Log Level
|
||||||
|
{
|
||||||
|
local action=$1 level=$2 chains=
|
||||||
|
|
||||||
|
eval chains="\$${action}_chains"
|
||||||
|
|
||||||
|
set -- $chains
|
||||||
|
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
[ "$1" = "$level" ] && { echo $2 ; return ; }
|
||||||
|
shift;shift
|
||||||
|
done
|
||||||
|
|
||||||
|
createlogactionchain $action $level
|
||||||
|
|
||||||
|
echo $CHAIN
|
||||||
|
|
||||||
|
eval ${action}_chains=\"\$${action}_chains $level $CHAIN\"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Read /etc/shorewall/actions and for each defined <action>, pre-process
|
# Read /etc/shorewall/actions and for each defined <action>, pre-process
|
||||||
# /etc/shorewall/action.<action>
|
# /etc/shorewall/action.<action>
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
#
|
#
|
||||||
# Finally, you may also specify a comma-separated
|
# Finally, you may also specify a comma-separated
|
||||||
# list of ranges and/or addresses in this column.
|
# list of ranges and/or addresses in this column.
|
||||||
#
|
#
|
||||||
# This column may not contain DNS Names.
|
# This column may not contain DNS Names.
|
||||||
#
|
#
|
||||||
# If you want to leave this column empty
|
# If you want to leave this column empty
|
||||||
|
Loading…
Reference in New Issue
Block a user