forked from extern/shorewall_code
Conditionally create accounting chain
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@696 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
7cb2d841aa
commit
347ed2f629
@ -1763,6 +1763,7 @@ delete_tc()
|
||||
#
|
||||
process_accounting_rule() {
|
||||
rule=
|
||||
rule2=
|
||||
chain=
|
||||
|
||||
accounting_error() {
|
||||
@ -1854,10 +1855,7 @@ process_accounting_rule() {
|
||||
chain_exists accounting || createchain accounting No
|
||||
|
||||
if iptables -A accounting $rule ; then
|
||||
if [ "x$rule2" != x ]; then
|
||||
if ! iptables -A accounting $rule2 ; then
|
||||
return;
|
||||
fi
|
||||
[ "x$rule2" != x ] && run_iptables -A accounting $rule2
|
||||
echo " Accounting rule" $action $source $dest $proto $port $sport Added
|
||||
fi
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user