forked from extern/shorewall_code
Make 'check -r' work like 'compile' WRT optimization
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
9869420106
commit
69387b9099
@ -112,6 +112,7 @@ our %EXPORT_TAGS = (
|
|||||||
ALL_COMMANDS
|
ALL_COMMANDS
|
||||||
NOT_RESTORE
|
NOT_RESTORE
|
||||||
OPTIMIZE_POLICY_MASK
|
OPTIMIZE_POLICY_MASK
|
||||||
|
OPTIMIZE_POLICY_MASK1
|
||||||
OPTIMIZE_RULESET_MASK
|
OPTIMIZE_RULESET_MASK
|
||||||
OPTIMIZE_MASK
|
OPTIMIZE_MASK
|
||||||
|
|
||||||
@ -368,6 +369,7 @@ use constant { ALL_COMMANDS => 1, NOT_RESTORE => 2 };
|
|||||||
#
|
#
|
||||||
use constant {
|
use constant {
|
||||||
OPTIMIZE_POLICY_MASK => 0x02 , # Call optimize_policy_chains()
|
OPTIMIZE_POLICY_MASK => 0x02 , # Call optimize_policy_chains()
|
||||||
|
OPTIMIZE_POLICY_MASK1 => 0x06 ,
|
||||||
OPTIMIZE_RULESET_MASK => 0x1C , # Call optimize_ruleset()
|
OPTIMIZE_RULESET_MASK => 0x1C , # Call optimize_ruleset()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -817,11 +817,11 @@ sub compiler {
|
|||||||
#
|
#
|
||||||
# Optimize Policy Chains
|
# Optimize Policy Chains
|
||||||
#
|
#
|
||||||
optimize_policy_chains if $optimize & 6 == 2; # Level 2 but not 4
|
optimize_policy_chains if ( $optimize & OPTIMIZE_POLICY_MASK1 ) == OPTIMIZE_POLICY_MASK; # Level 2 but not 4
|
||||||
#
|
#
|
||||||
# More Optimization
|
# More Optimization
|
||||||
#
|
#
|
||||||
optimize_ruleset if $config{OPTIMIZE} & 0x1C;
|
optimize_ruleset if $config{OPTIIMIZE} & OPTIMIZE_RULESET_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
enable_script;
|
enable_script;
|
||||||
@ -877,16 +877,16 @@ sub compiler {
|
|||||||
|
|
||||||
optimize_level0;
|
optimize_level0;
|
||||||
|
|
||||||
if ( $config{OPTIMIZE} & OPTIMIZE_MASK ) {
|
if ( ( my $optimize = $config{OPTIMIZE} & OPTIMIZE_MASK ) ) {
|
||||||
progress_message2 'Optimizing Ruleset...';
|
progress_message2 'Optimizing Ruleset...';
|
||||||
#
|
#
|
||||||
# Optimize Policy Chains
|
# Optimize Policy Chains
|
||||||
#
|
#
|
||||||
optimize_policy_chains if $config{OPTIMIZE} & OPTIMIZE_POLICY_MASK;
|
optimize_policy_chains if ( $optimize & OPTIMIZE_POLICY_MASK1 ) == OPTIMIZE_POLICY_MASK; # Level 2 but not 4
|
||||||
#
|
#
|
||||||
# Ruleset Optimization
|
# Ruleset Optimization
|
||||||
#
|
#
|
||||||
optimize_ruleset if $config{OPTIMIZE} & OPTIMIZE_RULESET_MASK;
|
optimize_ruleset if $optimize & OPTIMIZE_RULESET_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
enable_script if $debug;
|
enable_script if $debug;
|
||||||
|
Loading…
Reference in New Issue
Block a user