Reduce the size of many configs by not copying long chains multiple times.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2011-12-30 10:27:58 -08:00
parent b63c7e0016
commit 6f61293b08

View File

@ -2783,7 +2783,7 @@ sub optimize_level4( $$ ) {
# Last rule is a simple branch
my $targetref = $tableref->{$lastrule->{target}};
if ( $targetref && ! ( $targetref->{builtin} || $targetref->{dont_move} ) ) {
if ( $targetref && ! ( $targetref->{builtin} || $targetref->{dont_move} ) && ( keys %{$targetref->{references}} < 2 || @{$targetref->{rules}} < 4 ) ) {
copy_rules( $targetref, $chainref );
$progress = 1;
}