From cc30fc4dbb91703b58bde681f373e76da0998ed4 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 27 Dec 2010 17:16:34 -0800 Subject: [PATCH] Eliminate max nest level on actions --- Shorewall/Perl/Shorewall/Rules.pm | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index 8e942f306..967222346 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -58,10 +58,9 @@ our @builtins; # our $rule_commands = { COMMENT => 0, FORMAT => 2 }; -use constant { MAX_MACRO_NEST_LEVEL => 5 , MAX_ACTION_NEST_LEVEL => 5 }; +use constant { MAX_MACRO_NEST_LEVEL => 5 }; our $macro_nest_level; -our $action_nest_level; our @actions; @@ -80,7 +79,6 @@ sub initialize( $ ) { %macros = (); @actions = (); $macro_nest_level = 0; - $action_nest_level = 0; if ( $family == F_IPV4 ) { @builtins = qw/dropBcast allowBcast dropNotSyn rejNotSyn dropInvalid allowInvalid allowinUPnP forwardUPnP Limit/; @@ -338,8 +336,6 @@ sub process_action2( $ ) { progress_message2 " Pre-processing $actionfile..."; - fatal_error "Actions nested too deeply" if ++$action_nest_level > MAX_ACTION_NEST_LEVEL; - push_open( $actionfile ); my $oldparms = push_params( $param ); @@ -373,8 +369,6 @@ sub process_action2( $ ) { pop_open; - --$action_nest_level; - pop_params( $oldparms ); $actions{$action}{active}--;