From 402b3b929e92ae3caca01fa604f1f8cfa81591c9 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 17 Sep 2010 14:35:25 -0700 Subject: [PATCH] Restore trace output in move_rules() Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Chains.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 160568e53..33cfba648 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -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;