diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 79e5d7f0c..041ce2593 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -1017,13 +1017,17 @@ sub new_chain($$) assert( $chain_table{$table} && ! ( $chain_table{$table}{$chain} || $builtin_target{ $chain } ) ); - $chain_table{$table}{$chain} = { name => $chain, - rules => [], - table => $table, - loglevel => '', - log => 1, - cmdlevel => 0, - references => {} }; + my $chainref = { name => $chain, + rules => [], + table => $table, + loglevel => '', + log => 1, + cmdlevel => 0, + references => {} }; + + trace( $chainref, 'N', undef, '' ) if $debug; + + $chain_table{$table}{$chain} = $chainref; } #