From 6c1a5b80514ed5161f871d54e511c251ac28ad56 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sat, 1 Dec 2012 12:10:06 -0800 Subject: [PATCH] Be more agressive about detecting action recursion. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Rules.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index 2e27b1e80..a6e31e9fa 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -1554,7 +1554,7 @@ sub process_action( $) { my $oldparms = push_action_params( $chainref, $param ); - $active{$wholeaction}++; + $active{$action}++; push @actionstack, $wholeaction; push_comment( '' ); @@ -1612,7 +1612,7 @@ sub process_action( $) { pop_comment; - $active{$wholeaction}--; + $active{$action}--; pop @actionstack; pop_open; @@ -2029,7 +2029,7 @@ sub process_rule1 ( $$$$$$$$$$$$$$$$$$ ) { # $normalized_target = normalize_action( $basictarget, $loglevel, $param ); - fatal_error( "Action $basictarget invoked Recursively (" . join( '->', map( externalize( $_ ), @actionstack , $normalized_target ) ) . ')' ) if $active{$normalized_target}; + fatal_error( "Action $basictarget invoked Recursively (" . join( '->', map( externalize( $_ ), @actionstack , $normalized_target ) ) . ')' ) if $active{$basictarget}; if ( my $ref = use_action( $normalized_target ) ) { #