forked from extern/shorewall_code
Expose to 'maclog' script
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6423 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
363a4e9016
commit
5bb54a041b
@ -54,6 +54,7 @@ our @EXPORT = qw(
|
||||
append_file
|
||||
run_user_exit
|
||||
run_user_exit1
|
||||
run_user_exit2
|
||||
generate_aux_config
|
||||
|
||||
%config
|
||||
@ -1199,6 +1200,33 @@ sub run_user_exit1( $ ) {
|
||||
fatal_error "Couldn't run $file";
|
||||
}
|
||||
}
|
||||
|
||||
pop_open;
|
||||
}
|
||||
}
|
||||
|
||||
sub run_user_exit2( $$ ) {
|
||||
my ($file, $chainref) = ( find_file $_[0], $_[1] );
|
||||
|
||||
if ( -f $file ) {
|
||||
progress_message "Processing $file...";
|
||||
#
|
||||
# File may be empty -- in which case eval would fail
|
||||
#
|
||||
push_open $file;
|
||||
|
||||
if ( read_a_line ) {
|
||||
close_file;
|
||||
|
||||
unless (my $return = eval `cat $file` ) {
|
||||
fatal_error "Couldn't parse $file: $@" if $@;
|
||||
fatal_error "Couldn't do $file: $!" unless defined $return;
|
||||
fatal_error "Couldn't run $file";
|
||||
}
|
||||
}
|
||||
|
||||
pop_open;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -777,7 +777,7 @@ sub setup_mac_lists( $ ) {
|
||||
'done' );
|
||||
}
|
||||
|
||||
run_user_exit1 'maclog';
|
||||
run_user_exit2( 'maclog', $chainref );
|
||||
|
||||
log_rule_limit $level, $chainref , $chain , $disposition, '', '', 'add', '' if $level ne '';
|
||||
add_rule $chainref, "-j $target";
|
||||
|
Loading…
Reference in New Issue
Block a user