diff --git a/Shorewall-perl/Shorewall/Actions.pm b/Shorewall-perl/Shorewall/Actions.pm index 85f737f54..5c8174550 100644 --- a/Shorewall-perl/Shorewall/Actions.pm +++ b/Shorewall-perl/Shorewall/Actions.pm @@ -323,6 +323,8 @@ sub process_action1 ( $$ ) { fatal_error "Parameter value not allowed in action files ($param)" if $paramtype & NATRULE; } + fatal_error "Invalid or missing ACTION ( $wholetarget )" unless defined $target; + if ( find_macro $target ) { process_macro1( $action, $macros{$target} ); } else { diff --git a/Shorewall-perl/Shorewall/Rules.pm b/Shorewall-perl/Shorewall/Rules.pm index 2dd54b2d5..b2033aef5 100644 --- a/Shorewall-perl/Shorewall/Rules.pm +++ b/Shorewall-perl/Shorewall/Rules.pm @@ -808,7 +808,10 @@ sub process_macro ( $$$$$$$$$$$$ ) { $mtarget = substitute_param $param, $mtarget; } - my $action = isolate_basic_target $mtarget; + my $action = isolate_basic_target $mtarget; + + fatal_error "Invalid or missing ACTION ( $mtarget )" unless defined $action; + my $actiontype = $targets{$action} || find_macro( $action ); fatal_error "Invalid Action ($mtarget) in macro" unless $actiontype & ( ACTION + STANDARD + NATRULE + MACRO );