Correct comment formatting in 'trace' output

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-07-30 09:03:19 -07:00
parent a05623f49e
commit decf9d3b3e
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -1337,7 +1337,14 @@ sub push_rule( $$ ) {
push @{$chainref->{rules}}, $ruleref;
$chainref->{referenced} = 1;
$chainref->{optflags} |= RETURNS_DONT_MOVE if ( $ruleref->{target} || '' ) eq 'RETURN';
trace( $chainref, 'A', @{$chainref->{rules}}, "-A $chainref->{name} $_[1] $ruleref->{comment}" ) if $debug;
if ( $debug ) {
if ( $ruleref->{comment} ) {
trace( $chainref, 'A', @{$chainref->{rules}}, "-A $chainref->{name} $_[1] -m comment --comment \"$ruleref->{comment}\"" );
} else {
trace( $chainref, 'A', @{$chainref->{rules}}, "-A $chainref->{name} $_[1]" );
}
}
$chainref->{complete} = 1 if $complete;