From 5b7a9db17008dbca56f85cf1d70703f42e51c8fe Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 28 Mar 2016 15:48:59 -0700 Subject: [PATCH] Correct clearing of inline matches Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Rules.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index 78af71ff3..c41c20f70 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -2309,6 +2309,10 @@ sub process_macro ($$$$$$$$$$$$$$$$$$$$$) { } 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"; @@ -2453,6 +2457,10 @@ sub process_inline ($$$$$$$$$$$$$$$$$$$$$$) { progress_message "..End inline action $inlinefile"; 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; } @@ -3662,10 +3670,6 @@ sub process_raw_rule ( ) { $wild ) ) { $generated = 1; } - # - # Clear inline matches - # - set_inline_matches( '' ); } } }