1
0

Allow 'any' and 'all' in /etc/shorewall/accounting

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6467 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-06-05 22:13:58 +00:00
parent 560433a2b2
commit 61638c996c
2 changed files with 9 additions and 1 deletions
Shorewall-perl/Shorewall

View File

@ -27,6 +27,7 @@ package Shorewall::Accounting;
require Exporter;
use Shorewall::Common;
use Shorewall::Config;
use Shorewall::IPAddrs;
use Shorewall::Zones;
use Shorewall::Chains;
@ -63,6 +64,10 @@ sub process_accounting_rule( $$$$$$$$$ ) {
my $target = '';
$proto = '' if $proto eq 'any';
$ports = '' if $ports eq 'any' || $ports eq 'all';
$sports = '' if $sports eq 'any' || $sports eq 'all';
my $rule = do_proto( $proto, $ports, $sports ) . do_user ( $user ) . do_test ( $mark, 0xFF );
my $rule2 = 0;
@ -84,6 +89,9 @@ sub process_accounting_rule( $$$$$$$$$ ) {
}
}
$source = ALLIPv4 if $source eq 'any' || $source eq 'all';
$dest = ALLIPv4 if $dest eq 'any' || $dest eq 'all';
expand_rule
$chainref ,
NO_RESTRICT ,

View File

@ -1157,7 +1157,7 @@ sub append_file( $ ) {
my $user_exit = find_file $_[0];
my $result = 0;
unless ( $user_exit =~ /$globals{SHAREDIR}/ ) {
unless ( $user_exit =~ /^($globals{SHAREDIR})/ ) {
if ( -f $user_exit ) {
$result = 1;
save_progress_message "Processing $user_exit ...";