mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-16 02:28:13 +01:00
Small improvement in macro handling
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5706 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
8133c056fc
commit
a8231a26b8
@ -110,7 +110,8 @@ sub merge_levels ($$) {
|
||||
$subordinate;
|
||||
}
|
||||
|
||||
# Get Macro Name
|
||||
#
|
||||
# Get Macro Name -- strips away trailing /* and :* from the first column in a rule, macro or action.
|
||||
#
|
||||
sub isolate_basic_target( $ ) {
|
||||
( split '/', ( split /:/ , $_[0] )[0] )[0];
|
||||
|
@ -782,21 +782,22 @@ sub process_macro ( $$$$$$$$$$$ ) {
|
||||
sub process_rule1 ( $$$$$$$$$ ) {
|
||||
my ( $target, $source, $dest, $proto, $ports, $sports, $origdest, $ratelimit, $user ) = @_;
|
||||
my ( $action, $loglevel) = split_action $target;
|
||||
my ( $basictarget, $param ) = split '/', $action;
|
||||
my $rule = '';
|
||||
my $actionchainref;
|
||||
|
||||
#
|
||||
# Determine the validity of the action
|
||||
#
|
||||
my $actiontype = $targets{$action} || find_macro( isolate_basic_target $action );
|
||||
my $actiontype = $targets{$basictarget} || find_macro( $basictarget );
|
||||
|
||||
fatal_error "Unknown action ($action) in rule \"$line\"" unless $actiontype;
|
||||
|
||||
if ( $actiontype == MACRO ) {
|
||||
process_macro
|
||||
$macros{isolate_basic_target $action}, $
|
||||
$macros{$basictarget},
|
||||
target ,
|
||||
(split '/', $action)[1] ,
|
||||
$param ,
|
||||
$source,
|
||||
$dest,
|
||||
$proto,
|
||||
|
Loading…
Reference in New Issue
Block a user