forked from extern/shorewall_code
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:
parent
b63c7e0016
commit
6f61293b08
@ -2783,7 +2783,7 @@ sub optimize_level4( $$ ) {
|
|||||||
# Last rule is a simple branch
|
# Last rule is a simple branch
|
||||||
my $targetref = $tableref->{$lastrule->{target}};
|
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 );
|
copy_rules( $targetref, $chainref );
|
||||||
$progress = 1;
|
$progress = 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user