mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-15 04:04:10 +01:00
Cleanup new policy code
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@513 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
4f8c8857e4
commit
e6d9dda852
@ -1442,7 +1442,7 @@ delete_nat() {
|
||||
#
|
||||
setup_ecn() # $1 = file name
|
||||
{
|
||||
local interfaces
|
||||
local interfaces=""
|
||||
local hosts
|
||||
local h
|
||||
|
||||
@ -2169,7 +2169,7 @@ process_rule() # $1 = target
|
||||
|
||||
chain=${source}2${dest}
|
||||
|
||||
eval policy=${chain}_policy
|
||||
eval policy=\$${chain}_policy
|
||||
|
||||
[ $policy = NONE ] && \
|
||||
fatal_error "Rules may not override a NONE policy: rule \"$rule\""
|
||||
@ -2692,6 +2692,8 @@ rules_chain() # $1 = source zone, $2 = destination zone
|
||||
{
|
||||
local chain=${1}2${2}
|
||||
|
||||
[ "$1" = "$2" ] && { echo ACCEPT; return; }
|
||||
|
||||
havechain $chain && { echo $chain; return; }
|
||||
|
||||
eval chain=\$${chain}_policychain
|
||||
@ -3688,12 +3690,7 @@ activate_rules()
|
||||
|
||||
eval dest_hosts=\$${zone1}_hosts
|
||||
|
||||
if [ $zone = $zone1 ]; then
|
||||
chain=${zone}2${zone}
|
||||
havechain $chain || chain=ACCEPT
|
||||
else
|
||||
chain="`rules_chain $zone $zone1`"
|
||||
fi
|
||||
chain="`rules_chain $zone $zone1`"
|
||||
|
||||
eval policy_chain=
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user