Stop Accounting rule violations -- Take 3

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8420 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2008-04-11 01:48:05 +00:00
parent a5811aa4d4
commit 485d4f51e2

View File

@ -66,9 +66,8 @@ sub process_accounting_rule( $$$$$$$$$ ) {
our $disposition = '';
sub check_for_builtin( $ ) {
sub check_chain( $ ) {
my $chainref = shift;
fatal_error "A builtin Chain ($chainref->{name}) may not appear in the accounting file" if $chainref->{builtin};
fatal_error "A Shorewall-generated chain ($chainref->{name}) may not appear in the accounting file" if $chainref->{policy};
}
@ -79,7 +78,7 @@ sub process_accounting_rule( $$$$$$$$$ ) {
sub jump_to_chain( $ ) {
my $jumpchain = $_[0];
$jumpchainref = ensure_accounting_chain( $jumpchain );
check_for_builtin( $jumpchainref );
check_chain( $jumpchainref );
$disposition = $jumpchain;
"-j $jumpchain";
}
@ -143,9 +142,9 @@ sub process_accounting_rule( $$$$$$$$$ ) {
$dest = ALLIPv4 if $dest eq 'any' || $dest eq 'all';
}
my $chainref = ensure_filter_chain $chain , 0;
my $chainref = ensure_accounting_chain $chain;
check_for_builtin( $chainref );
check_chain( $chainref );
expand_rule
$chainref ,