Restore trace output in move_rules()

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2010-09-17 14:35:25 -07:00
parent 3d0f8e962e
commit 402b3b929e

View File

@ -690,6 +690,7 @@ sub increment_reference_count( $$ ) {
#
# The rules generated by interface options are added to the interfaces's input chain and
# forward chain. Shorewall::Rules::generate_matrix() may decide to move those rules to
# the head of a rules chain (behind any frozen rules already there).
sub move_rules( $$ ) {
my ($chain1, $chain2 ) = @_;
@ -710,7 +711,12 @@ sub move_rules( $$ ) {
adjust_reference_counts( $tableref->{$1}, $name1, $name2 ) if / -[jg] ([^\s]+)/;
}
splice @$rules, $chain2->{frozen}, 0, @{$chain1->{rules}};
if ( $debug ) {
my $rule = $frozen;
trace( $chain2, 'A', ++$rule, $_ ) for @{$chain1->{rules}};
}
splice @$rules, $frozen, 0, @{$chain1->{rules}};
$chain2->{referenced} = 1;