forked from extern/shorewall_code
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:
parent
560433a2b2
commit
61638c996c
@ -27,6 +27,7 @@ package Shorewall::Accounting;
|
|||||||
require Exporter;
|
require Exporter;
|
||||||
use Shorewall::Common;
|
use Shorewall::Common;
|
||||||
use Shorewall::Config;
|
use Shorewall::Config;
|
||||||
|
use Shorewall::IPAddrs;
|
||||||
use Shorewall::Zones;
|
use Shorewall::Zones;
|
||||||
use Shorewall::Chains;
|
use Shorewall::Chains;
|
||||||
|
|
||||||
@ -63,6 +64,10 @@ sub process_accounting_rule( $$$$$$$$$ ) {
|
|||||||
|
|
||||||
my $target = '';
|
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 $rule = do_proto( $proto, $ports, $sports ) . do_user ( $user ) . do_test ( $mark, 0xFF );
|
||||||
my $rule2 = 0;
|
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
|
expand_rule
|
||||||
$chainref ,
|
$chainref ,
|
||||||
NO_RESTRICT ,
|
NO_RESTRICT ,
|
||||||
|
@ -1157,7 +1157,7 @@ sub append_file( $ ) {
|
|||||||
my $user_exit = find_file $_[0];
|
my $user_exit = find_file $_[0];
|
||||||
my $result = 0;
|
my $result = 0;
|
||||||
|
|
||||||
unless ( $user_exit =~ /$globals{SHAREDIR}/ ) {
|
unless ( $user_exit =~ /^($globals{SHAREDIR})/ ) {
|
||||||
if ( -f $user_exit ) {
|
if ( -f $user_exit ) {
|
||||||
$result = 1;
|
$result = 1;
|
||||||
save_progress_message "Processing $user_exit ...";
|
save_progress_message "Processing $user_exit ...";
|
||||||
|
Loading…
Reference in New Issue
Block a user