mirror of
https://gitlab.com/shorewall/code.git
synced 2025-02-17 02:00:57 +01:00
More complete fix for inline matches
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
382ab380a2
commit
4fddfcfba0
@ -1798,6 +1798,7 @@ sub process_action(\$\$$) {
|
|||||||
my ( $action, $level, $tag, undef, $param ) = split /:/, $wholeaction, ACTION_TUPLE_ELEMENTS;
|
my ( $action, $level, $tag, undef, $param ) = split /:/, $wholeaction, ACTION_TUPLE_ELEMENTS;
|
||||||
my $type = $targets{$action};
|
my $type = $targets{$action};
|
||||||
my $actionref = $actions{$action};
|
my $actionref = $actions{$action};
|
||||||
|
my $matches = fetch_inline_matches;
|
||||||
|
|
||||||
if ( $type & BUILTIN ) {
|
if ( $type & BUILTIN ) {
|
||||||
$level = '' if $level =~ /none!?/;
|
$level = '' if $level =~ /none!?/;
|
||||||
@ -1910,6 +1911,7 @@ sub process_action(\$\$$) {
|
|||||||
$dscp ,
|
$dscp ,
|
||||||
$state,
|
$state,
|
||||||
$time );
|
$time );
|
||||||
|
set_inline_matches( $matches );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
my ($target, $source, $dest, $proto, $ports, $sports, $origdest, $rate, $user, $mark, $connlimit, $time, $headers, $condition, $helper );
|
my ($target, $source, $dest, $proto, $ports, $sports, $origdest, $rate, $user, $mark, $connlimit, $time, $headers, $condition, $helper );
|
||||||
@ -1961,6 +1963,8 @@ sub process_action(\$\$$) {
|
|||||||
$condition,
|
$condition,
|
||||||
$helper,
|
$helper,
|
||||||
0 );
|
0 );
|
||||||
|
|
||||||
|
set_inline_matches( $matches );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2199,6 +2203,7 @@ sub process_macro ($$$$$$$$$$$$$$$$$$$$$) {
|
|||||||
|
|
||||||
|
|
||||||
my $macrofile = $macros{$macro};
|
my $macrofile = $macros{$macro};
|
||||||
|
my $save_matches = fetch_inline_matches;
|
||||||
|
|
||||||
progress_message "..Expanding Macro $macrofile...";
|
progress_message "..Expanding Macro $macrofile...";
|
||||||
|
|
||||||
@ -2306,13 +2311,11 @@ sub process_macro ($$$$$$$$$$$$$$$$$$$$$) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
progress_message " Rule \"$currentline\" $done";
|
progress_message " Rule \"$currentline\" $done";
|
||||||
|
|
||||||
|
set_inline_matches( $save_matches );
|
||||||
}
|
}
|
||||||
|
|
||||||
pop_open;
|
pop_open;
|
||||||
#
|
|
||||||
# Clear the inline matches if we are the lowest level macro/inline invocation
|
|
||||||
#
|
|
||||||
set_inline_matches( '' ) if $macro_nest_level == 1;
|
|
||||||
|
|
||||||
progress_message "..End Macro $macrofile";
|
progress_message "..End Macro $macrofile";
|
||||||
|
|
||||||
@ -2341,6 +2344,7 @@ sub process_inline ($$$$$$$$$$$$$$$$$$$$$$) {
|
|||||||
my $inlinefile = $actionref->{file};
|
my $inlinefile = $actionref->{file};
|
||||||
my $options = $actionref->{options};
|
my $options = $actionref->{options};
|
||||||
my $nolog = $options & NOLOG_OPT;
|
my $nolog = $options & NOLOG_OPT;
|
||||||
|
my $save_matches = fetch_inline_matches;
|
||||||
|
|
||||||
setup_audit_action( $inline ) if $options & AUDIT_OPT;
|
setup_audit_action( $inline ) if $options & AUDIT_OPT;
|
||||||
|
|
||||||
@ -2448,6 +2452,8 @@ sub process_inline ($$$$$$$$$$$$$$$$$$$$$$) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
progress_message " Rule \"$currentline\" $done";
|
progress_message " Rule \"$currentline\" $done";
|
||||||
|
|
||||||
|
set_inline_matches( $save_matches );
|
||||||
}
|
}
|
||||||
|
|
||||||
pop_comment( $save_comment );
|
pop_comment( $save_comment );
|
||||||
@ -2457,10 +2463,6 @@ sub process_inline ($$$$$$$$$$$$$$$$$$$$$$) {
|
|||||||
progress_message "..End inline action $inlinefile";
|
progress_message "..End inline action $inlinefile";
|
||||||
|
|
||||||
pop_action_params( $oldparms );
|
pop_action_params( $oldparms );
|
||||||
#
|
|
||||||
# Clear the inline matches if we are the lowest level macro/inline invocation
|
|
||||||
#
|
|
||||||
set_inline_matches( '' ) if $macro_nest_level == 1;
|
|
||||||
|
|
||||||
return $generated;
|
return $generated;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user