diff --git a/New/Shorewall/Actions.pm b/New/Shorewall/Actions.pm index 1bff05d92..846a3cfe7 100644 --- a/New/Shorewall/Actions.pm +++ b/New/Shorewall/Actions.pm @@ -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]; diff --git a/New/Shorewall/Rules.pm b/New/Shorewall/Rules.pm index bdc9ed13e..ad0d0f24d 100644 --- a/New/Shorewall/Rules.pm +++ b/New/Shorewall/Rules.pm @@ -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,