From 9796c58eb23ea177768087b0e5831741090bc7cd Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 23 Jan 2018 13:15:44 -0800 Subject: [PATCH] Add OPTIMIZE_MASK constant Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Compiler.pm | 2 +- Shorewall/Perl/Shorewall/Config.pm | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Compiler.pm b/Shorewall/Perl/Shorewall/Compiler.pm index cdf1c7611..67c6282d2 100644 --- a/Shorewall/Perl/Shorewall/Compiler.pm +++ b/Shorewall/Perl/Shorewall/Compiler.pm @@ -899,7 +899,7 @@ sub compiler { optimize_level0; - if ( ( my $optimize = $config{OPTIMIZE} ) & 0x1E ) { + if ( ( my $optimize = $config{OPTIMIZE} ) & OPTIMIZE_MASK ) { progress_message2 'Optimizing Ruleset...'; # # Optimize Policy Chains diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index ba0728132..9fdca363a 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -302,6 +302,7 @@ our %EXPORT_TAGS = ( internal => [ qw( create_temp_script DO_SECTION NORMAL_READ + OPTIMIZE_MASK OPTIMIZE_POLICY_MASK OPTIMIZE_POLICY_MASK2n4 OPTIMIZE_RULESET_MASK @@ -544,6 +545,7 @@ use constant { OPTIMIZE_POLICY_MASK => 0x02 , # Call optimize_policy_chains() OPTIMIZE_POLICY_MASK2n4 => 0x06 , OPTIMIZE_RULESET_MASK => 0x1C , # Call optimize_ruleset() + OPTIMIZE_MASK => 0x1E , # Do optimizations beyond level 1 OPTIMIZE_ALL => 0x1F , # Maximum value for documented categories. OPTIMIZE_USE_FIRST => 0x1000 # Always use interface 'first' chains -- undocumented